An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20121029/8da7bd03/attachment.pl>
Error unary operator
4 messages · Jean Jang, Jeff Newmiller, Peter Dalgaard +1 more
a) not reproducible, read the posting guide
b) there is actually a forum dedicated to ggplot2 where you would get better answers
c) I have not had luck providing an expression as the data argument to ggplot.
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.
Jean Jang <jeanwaijang at gmail.com> wrote:
Hi R - listers, I am receiving an error. Does anyone know what this means? J ggplot(subset(foo, Rayos != "Rayos.NA"), aes(x=HTL, y=DevelopIndex, colour=TotalEggs)) +geom_point() +geom_jitter() + facet_grid(Aeventexhumed ~ Rayos) + geom_smooth(method="lm", fill=NA) + ylim(c(0, 7)) Error in +geom_smooth(method = "lm", fill = NA) : invalid argument to unary operator [[alternative HTML version deleted]]
______________________________________________ R-help at 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.
On Oct 30, 2012, at 05:34 , Jean Jang wrote:
Hi R - listers, I am receiving an error. Does anyone know what this means? J
This command:
ggplot(subset(foo, Rayos != "Rayos.NA"), aes(x=HTL, y=DevelopIndex, colour=TotalEggs)) +geom_point() +geom_jitter() + facet_grid(Aeventexhumed ~ Rayos)
... ends here. This command:
+ geom_smooth(method="lm", fill=NA) + ylim(c(0, 7))
makes no sense in isolation. Hence
Error in +geom_smooth(method = "lm", fill = NA) : invalid argument to unary operator
I suppose the + wants to be on the preceding line.
Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
it looks like
facet_grid(Aeventexhumed ~ Rayos)
+ geom_smooth(method="lm", fill=NA) + ylim(c(0, 7))
should read
facet_grid(Aeventexhumed ~ Rayos) +
geom_smooth(method="lm", fill=NA) + ylim(c(0, 7))
In ggplot the + must be on the preceding line.
John Kane
Kingston ON Canada
-----Original Message----- From: jeanwaijang at gmail.com Sent: Mon, 29 Oct 2012 18:34:39 -1000 To: r-help at r-project.org Subject: [R] Error unary operator Hi R - listers, I am receiving an error. Does anyone know what this means? J ggplot(subset(foo, Rayos != "Rayos.NA"), aes(x=HTL, y=DevelopIndex, colour=TotalEggs)) +geom_point() +geom_jitter() + facet_grid(Aeventexhumed ~ Rayos) + geom_smooth(method="lm", fill=NA) + ylim(c(0, 7)) Error in +geom_smooth(method = "lm", fill = NA) : invalid argument to unary operator [[alternative HTML version deleted]]
______________________________________________ R-help at 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.
____________________________________________________________ GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at http://www.inbox.com/smileys Works with AIM?, MSN? Messenger, Yahoo!? Messenger, ICQ?, Google Talk? and most webmails