[R] How to strip one term from a data.frame? + How to write long line in script?
Guojun Zhu
shmilylemon at yahoo.com
Mon May 1 12:52:54 CEST 2006
I need to run a regression with 14 normal variables
and 20 dummy variables. All the data is in a huge
data.frame df. But there is some extra intermediate
item in the same data.frame too. It will be nice I
can strip off those terms and run lm(). Also, is
there a simple way to write the formula, for example,
just specify the y term, all other term in data.frame
should be x_i. Or is there some kind of automatically
way to build it? like use ls(df) couple with some
other functions?
If I have to write it in the brute force way, I will
need to write a real long line in script. I am in
windows. I found the script does not work with a long
line. It will not work either if I break it into a
few lines. How to get rid of that? thanks.
More information about the R-help
mailing list