The-plotter
unread,Mar 2, 2012, 3:47:15 PM3/2/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ggplot2
See below - two numeric variables in a dataframe named ITERDATA. It
works in qplot. It doesn't work in qqplot,
even with attaching the data to the local environment and specifying
the dataframe within aes. Please advise.
> ggplot(ITERDATA, aes(x = NEW_PSTOCK, y = Pop_trends), geom='point')
Error: No layers in plot
> attach(ITERDATA)
> qplot(NEW_PSTOCK, Pop_trends); # works
> ggplot(ITERDATA, aes(x = NEW_PSTOCK, y = Pop_trends), geom='point'); # doesn't work
Error: No layers in plot
> ggplot(aes(x = ITERDATA$NEW_PSTOCK, y = ITERDATA$Pop_trends), geom='point'); # doesn't work
Error: ggplot2 doesn't know how to deal with data of class uneval
> summary(NEW_PSTOCK)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.0 0.0 0.5 0.5 1.0 1.0
> summary(Pop_trends)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.8412 0.9995 1.0100 1.0100 1.0200 1.0660
> qplot(NEW_PSTOCK, Pop_trends); # works
> search()
[1] ".GlobalEnv" "ITERDATA" "package:ggplot2"
"package:gtools" "package:gdata"
[6] "package:stats" "package:graphics" "package:grDevices"
"package:utils" "package:datasets"
[11] "package:reshape" "package:plyr" "package:grid"
"package:proto" "package:methods"
[16] "Autoloads" "package:base"
>