This is an example of two months of data from a twenty four month data set that I would like to apply this too. These data are subsets of the same stations throught time, but differing ones were included on different sampling dates. I would like to subset these data and then put them together as a big matrix with the by column being RiverMile. What is the easiest way to proceed as this is a process that will be done on 96+ constituents?
feb06 <- structure(list(RiverMile = c(202L, 190L, 185L), X2.1.06 = c(2850000, NA, NA)), .Names = c("RiverMile", "X2.1.06"), row.names = c(29L, 31L, 32L), class = "data.frame") may06 <- structure(list(RiverMile = c(202L, 198L, 190L, 185L, 148L), X5.1.06 = c(NA_real_, NA_real_, NA_real_, NA_real_, NA_real_)), .Names = c("RiverMile", "X5.1.06"), row.names = c(29L, 30L, 31L, 32L, 34L), class = "data.frame") merge(feb06, may06, by="RiverMile") Error in fix.by(by.x, x) : 'by' must specify column(s) as numbers, names or logical #I have provided the column name. Is it because they are of differing lengths? thanks Stephen -- Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis [[alternative HTML version deleted]] ______________________________________________ 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.