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

geom_smooth parameters no longer available in qplot #1612

Closed
salauer opened this issue Apr 15, 2016 · 3 comments
Closed

geom_smooth parameters no longer available in qplot #1612

salauer opened this issue Apr 15, 2016 · 3 comments
Labels
reprex needs a minimal reproducible example

Comments

@salauer
Copy link

salauer commented Apr 15, 2016

In the past, I was able to write the following code:

qplot(data=dat, x=x_var, y=y_var, geom=c("point", "smooth"), se=FALSE, method="lm")

But now that returns the error: "Error: Unknown parameters: se, method"

Of course it isn't too difficult to just add + geom_smooth(se=FALSE, method="lm") but I guess I don't understand why it was taken out of qplot's functionality.

@thomasp85
Copy link
Member

Related to #1585

@hadley hadley added the reprex needs a minimal reproducible example label Jul 28, 2016
@hadley
Copy link
Member

hadley commented Jul 28, 2016

Please provide a reproducible example. There are three things you need to include to make your example reproducible: required packages, data, and code.

  1. Packages should be loaded at the top of the script, so it's easy to
    see which ones the example needs. This is a good time to check that you're
    using the latest version of each package: it's possible you've discovered
    a bug that been fixed since you installed the package.
  2. The easiest way to include data in a question is to use dput() to
    generate the R code to recreate it. For example, to recreate the mtcars
    dataset in R, I'd perform the following steps:
  3. Run dput(mtcars) in R
  4. Copy the output
  5. In my reproducible script, type mtcars <- then paste.

Try and find the smallest subset of your data that still reveals
the problem.
3. Spend a little bit of time ensuring that your code is easy for others to
read:

  • Make sure you've used spaces and your variable names are concise, yet
    informative.
  • Use comments to indicate where your problem lies.
  • Do your best to remove everything that is not related to the problem.
    The shorter your code is, the easier it is to understand, and the
    easier it is to fix.

Finish by checking that you have actually made a reproducible example by starting a fresh R session and copying and pasting your script in.

(@thomasp85 - I think it's actually slightly different - that issue is to do with aesthetics where as this is parameters. i.e. in this case we should be able to automatically pull the parameters out of the aesthetics)

@salauer
Copy link
Author

salauer commented Jul 29, 2016

Just tried this again after a long while and there appears to be no issue. Either "thanks ggplot team!" for fixing it or "sorry ggplot team!" if there was no issue in the first place.
Cheers

@salauer salauer closed this as completed Jul 29, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
reprex needs a minimal reproducible example
Projects
None yet
Development

No branches or pull requests

3 participants