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]]
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 operatorI 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
Jean Jang
2012-Nov-05 07:51 UTC
[R] Hypothesis "RayosRayos.2 = (Intercept)" is not well formed: contains bad coefficient/variable names.
Hi R-listers, I am trying to do this function amongst others for a Chi-sq test in > require(multcomp) for some reason it is not working but all of the other functions have work. What does this error mean and how do I fix it? Jean > linearHypothesis(model.rayos.C, "RayosRayos.2 = (Intercept)") Error in constants(lhs, cnames_symb) : The hypothesis "RayosRayos.2 = (Intercept)" is not well formed: contains bad coefficient/variable names. In addition: Warning message: In constants(lhs, cnames_symb) : NAs introduced by coercion
Reasonably Related Threads
- add1 GLM - Warning message, what does it mean?
- How do I compare 47 GLM models with 1 to 5 interactions and unique combinations?
- Error in eval(expr, envir, enclos) : object 'Rayos' not found???
- Q - scatterplot, plot function & trellis linear regressions???
- Best method for comparing rectangles sections of beach