r - Error in eval(expr, envir, enclos) (from unknown!7788Kmk#8) -
error in eval(expr, envir, enclos) (from unknown!7788kmk#8)
im getting error:
error in eval(expr, envir, enclos) (from unknown!7788kmk#8) : object 'nickname' not found.
code
| | nickname | d7li | x | |----------------------------+----------+--------+-----| | dd\_ol\_dhofar132b111@5012 | ol1a | 24.2 | 48 | | dd\_ol\_dhofar132b111@5013 | ol1a | 22.5 | 91 | # dataset d7li.ol1a <- subset(tbl,subset=(nickname=="ol1a"))$d7li x.ol1a <- subset(tbl,subset=(nickname=="ol1a"))$x xlim <- c(0, 750) ylim <- c(-30, 30) legend <- c( "dhofar132" ) col <- c("red") pch <- c(16,17) par(mar=c(2,2,0,0)) plot(1,0,type="n",xlim=xlim,ylim=ylim,log="x") lines(d7li.ol1a , x.ol1a ,pch=pch[1],col=col[1]) legend("topleft",legend,pch=15,col=col)
the column "nickname" not exist in data.frame tbl. can find out column names using colnames(tbl). copy name exactly. lyzander mentioned, r case sensitive.
also, using:
d7li.ol1a <- subset(tbl,subset=(nickname=="ol1a"), select = "d7li")
this not better. way use subset.
Comments
Post a Comment