[R] Data manipulation

Lew lstringer at montana.edu
Fri Feb 7 23:39:03 CET 2003


I am interested in building a model with a subset of data from a column.

The first 6 lines of my data look like this:
    QUAD YEAR SITE TREAT HERB TILL PLANT SEED Kweed 
1     A4 2002    s     1    N    N     N    N 55.00   
2    A10 2002    s     1    N    N     N    N 60.00   
3     B2 2002    s     1    N    N     N    N 35.00  
4     C2 2002    s     1    N    N     N    N 23.00   
5     C9 2002    s     1    N    N     N    N 70.00   
6     11 2002    m     1    N    N     N    N 22.00   

I tried this command to get the subset I want:

> knap.fit1<-(lm(Kweed~TREAT[41:60,81:100,101:120,121:140], data=knap))
No luck.
 
Can anyone tell me how to code for this subset.

Thanks

Lew Stringer
M.S. Student- Land Rehabilitation
Dept. of Land Resources and Environmental Sciences 
Montana State University
822 Leon Johnson Hall
Bozeman, MT 59717
Lab:(406)994-6811
Fax:(406)994-3933




More information about the R-help mailing list