Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include qplot() in ggplot lesson? #553

wallacelab opened this issue Aug 19, 2019 · 0 comments


Copy link

commented Aug 19, 2019

I'm debating whether it makes sense to include a short section on the qplot() function at the start/end of the ggplot() section. qplot() function is a very fast and easy way to plot graphs, and may be all many learners need (especially at first). For example, the following code using full ggplot syntax

ggplot(gapminder, mapping=aes(x=gdpPercap, y=lifeExp)) + geom_point()

can be rentered with qplot() as

qplot(x=gdpPercap, y=lifeExp, data=gapminder, geom="point")

which uses only 1 function call instead of 3 and follows more typical R syntax.

As far as I can tell the two ways are functionally equivalent, so that you can continue to add layers to the qplot() command if you want.

The biggest problem is that adding this would probably require shortening some other section of the lesson. (Though if it's at the end, probably less than if it's at the beginning because it would just be "here's this useful shortcut.") I'm not sure what I would cut, as everything there seems pretty important. So I'm asking for people's input:

  • Would having a section on qplot() be a useful/important addition to the lesson?
  • If so, what other section might be shortened to make room for it?


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.