[R] $ operator is invalid for atomic vectors
agrins
agrinde at d.umn.edu
Fri Sep 14 20:33:32 CEST 2012
HI all-
I have used this .fun in S+ without a problem however, in R when I run this
code to generate multiple graphs:
trendplot<-function(datafr,dataf2, abbrev="", titlestr="",
devname="s",filen="",styr=1990,endyr=2012) {
if (!is.null(dev.list())) {dev.off()}
dataf<-datafr[datafr$abbrev==abbrev,] #subset entire dataset with one
species at a time
dataf2sp<-dataf2[dataf2$abbrev==abbrev,] etc...
It returns "Error in dataf2$abbrev : $ operator is invalid for atomic
vectors"
Is there an easy fix for this error?
Thanks for the help-
Alexis
--
View this message in context: http://r.789695.n4.nabble.com/operator-is-invalid-for-atomic-vectors-tp4643189.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list