Hi,
Say I have dataframes d1, d2, ... , dn, and I want to apply a
function to all of them. For example, say I want to change the name
of the second variable in each dataframe to "x2". The following doesn't work:
a = list(d1,d2,d3,d4)
lapply(a,function(x) names(x)[2] = "x2")
What would work
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Hi,
This concerns lrm in the Design package, which I need for the clustered
errors option with panel data.
I have created a variable (using sign()) that has values -1, 0, and 1
(and some NAs). call this variable x3. lrm does not like
t = lrm(y ~ x1 + x2 + I(x3==-1) + I(x3==1), data=data,x
3 matches
Mail list logo