Hello again,
After getting some help from a reader of this board my issue has been
resolved.
To group I will now use something like this:
sub.all <- subset(all, ex_bin==250, select= c(pfor, ED, PD))
before I perform any further analysis, such as lm.
Thanks,
M Just
--------------------
Hello,
Below are the first two rows from my dataset and the header. This dataset
has 5749 rows and I want to select only certain rows to be used based on
existing grouping values. I am trying to group the data based on the values
under 'ex_bin'. (e.g a group for 250, 251, 252, 500, 501, 502) I would
then
like to perform a lm for each grouping.
My data:
> all[1:2,]
year extent scape bi_ca r ex_bin PriNo pri1234 pri_ex sc_ex Sc_ex_pri
sc_ec_p1234 PD LPI ED LSI
1 3 25 1 1 3251 251 1 1 26 125
1125 1125 21.6565 62.6602 82.0769 15.8792
2 3 25 1 1 3251 251 1 1 26 125
1125 1125 19.3076 27.6264 111.2014 20.7889
PAFRAC PROX_MN ENN_MN CONTAG pfor purban
1 1.440 319.6529 114.8314 62.0965 69.4891 12.3124
2 1.467 396.1949 105.3712 52.9186 38.1179 15.1906
I tried using:
all.lm <- (pfor~PD, data = all, subset=(ex_bin==250))
but this resulted in a bogus analysis filed with 'NAs'. I then tried to
use
getGroups.
> all.group <- getGroups(data=all, ex_bin ='250')
Error in getGroups(data = all, ex_bin = "250") :
unused argument(s) (ex_bin = "250")
Again, no success. I am approaching this correctly?
Thank you kindly,
Regards,
M Just
[[alternative HTML version deleted]]