Hi,(i'm not sure my previous post worked, sorry for additional information)I'm new to ggplot2 and can't get the following to work after reading help topics about it and trying different combinations of command> names(braw)[1] "AVG_PAYMENT" "PASSING" "SPECIALTY_GROUP" "MONTH"> qplot(PASSING, AVG_PAYMENT, data = braw, geom="bar", stat="identity", fill = SPECIALTY_GROUP, position="dodge")> qplot(PASSING, AVG_PAYMENT, data = braw, geom="bar", stat="identity", fill = SPECIALTY_GROUP, position="dodge")+facet_wrap(factor(braw$MONTH))Error in layout_base(data, vars, drop = drop) :At least one layer must contain all variables used for facetting> qplot(PASSING, AVG_PAYMENT, data = braw, geom="bar", stat="identity", fill = SPECIALTY_GROUP, position="dodge")+facet_wrap(factor(MONTH))Error in factor(MONTH) : object 'MONTH' not found> qplot(PASSING, AVG_PAYMENT, data = braw, geom="bar", stat="identity", fill = SPECIALTY_GROUP, position="dodge")+facet_wrap(factor(MONTH))Error in factor(MONTH) : object 'MONTH' not found> qplot(PASSING, AVG_PAYMENT, data = braw, geom="bar", stat="identity", fill = SPECIALTY_GROUP)+facet_wrap(factor(braw$MONTH))Error in layout_base(data, vars, drop = drop) :At least one layer must contain all variables used for facettingI also tried using ggplot directly, again with no success> p <- ggplot(braw, aes(PASSING, AVG_PAYMENT))+geom_bar()+facet_wrap(braw$SPECIALTY_GROUP~)Error: unexpected ')' in "p <- ggplot(braw, aes(PASSING, AVG_PAYMENT))+geom_bar()+facet_wrap(braw$SPECIALTY_GROUP~)"> p <- p + facet_wrap(factor(braw$MONTH))> pError in layout_base(data, vars, drop = drop) :At least one layer must contain all variables used for facetting
| From: | Dhaval Adjodah <nucle...@gmail.com> |
| To: | Brandon Hurr <brando...@gmail.com> |
| Cc: | Dennis Murphy <djm...@gmail.com>, ggp...@googlegroups.com |
| Date: | 07/05/2012 10:09 AM |
| Subject: | Re: error when using facet_wrap with qplot and ggplot |
| Sent by: | ggp...@googlegroups.com |
--
You received this message because you are subscribed to the ggplot2 mailing
list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2