Weights argument in lm and lme very different in R- am I using them correctly? So, it seems to me that the weights function in lm gives observations more weight the larger the associated observation's 'weight' value, while the lme function in lme does precisely the opposite. This can be verified with a simple simulation. 
#make 3 vectors- c is used as an uninformative random effect for the lme model
a<-c(1:10)
b<-c(2,4,6,8,10,100,14,16,18,20)
c<-c(1,1,1,1,1,1,1,1,1,1)

If you were now to run a model where you weight the observations based on the inverse of the dependent variable in lm, you can only generate the exact same result in nlme if you weight by just the dependent variable, without taking the inverse.
summary(lm(b~a,weights=1/b))
summary(lme(b~a,random=~1|c,weights=~b))

You can flip this and see the converse is true- specifying weights=b in lm requires weights=1/b to get a matching lme result. 
So, I understand this much, I just want validation on one thing and to ask a question about another.


*

*If I want to weight my data based on the inverse of the dependent variable, is it fine to just code weights=~(dependent variable) within lme?

*Why is lme written to handle weights completely differently than lm? What is the purpose of this other than to generate confusion? 


Any insight would be appreciated!
 A: Q1
In lme the notation weights = ~ b would result in the varFixed variance function being used with sole argument b. This function would add to the model a variance function $s^2(v)$ that has the form $s^2(v) = |v|$, where $v$ takes the values of the vector argument b.
Hence, you should use weights = ~ I(1/b) in lme() to have the variance of $\varepsilon_i = 1/b_i$.
In lm what you pass weights seems is the exact opposite; weights is inversely proportional to the variance.
I'm not 100% sure what you mean by weight my data, but if you mean provide the heterogeneous variance of the observations, then I think you want weights = ~ I(1/b).
Q2
My gut feeling (you'd have to ask the respective authors of the two functions) is that this is beacuse lm() and lme() were written by very different people to do very different things. lm() needed (was desired to be) to be compatible with S and various books, nlme didn't, and it aimed to be more flexible, allowing the heterogeneity to be modelled more flexibly than lm allows through the use of variance functions via the varFunc infrastructure.
