> qplot(carat, price, data = dsmall, geom = c("point", "smooth"), span = 1)Error: Unknown parameters: span
--
--
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+unsubscribe@googlegroups.com
More options: http://groups.google.com/group/ggplot2
---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
My guess is that you're using the old book, because I can't find this in the second edition.In my experience, qplot() was very useful in the beginning, but it made me lazy and made learning the full ggplot2 syntax more difficult. Also, I believe that qplot was semi-recently altered to simplify its capabilities. This might explain why your line of code no longer works.I don't have the dsmall code from the book in front of me so I don't know how big dsmall is compared to diamonds, but with the full diamonds dataset you are over 1000 rows of data so the default will be gam instead of loess. gam does not accept the span argument so you can give it different numbers all day and it will ignore you.These pages will give you some background.If you insist on using qplot(), just take the span=1 argument out of qplot and put it in stat_smooth() like so:qplot(carat, price, data = dsmall, geom = c("point", "smooth")) + stat_smooth(span=1)HTH,B
On Thu, Aug 18, 2016 at 7:43 PM, Benny Guo <baili...@gmail.com> wrote:
I use the example code in ggplot2. Elegant Graphics for Data Analysis to plot . I encounter the error message below:> qplot(carat, price, data = dsmall, geom = c("point", "smooth"), span = 1)Error: Unknown parameters: spanmy ggplot2 version is 2.1.0who can tell me what happens?
--
--
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
---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+u...@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+unsubscribe@googlegroups.com
More options: http://groups.google.com/group/ggplot2
---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+unsubscribe@googlegroups.com.