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

panel.lmbands() #90

Closed
nicholasjhorton opened this issue Jun 4, 2018 · 4 comments
Closed

panel.lmbands() #90

nicholasjhorton opened this issue Jun 4, 2018 · 4 comments

Comments

@nicholasjhorton
Copy link

Is there an easy way to replicate the functionality of panel.lmbands() for ggformula plots? This is used several times in some of the mosaic materials.

xyplot(age ~ cesd, panel = panel.lmbands, data = HELPrct)

screen shot 2018-06-04 at 3 44 57 pm

@nicholasjhorton
Copy link
Author

My proposal would be to include examples of how to create this functionality using broom::augment() and not craft a separate layer for this.

@rpruim
Copy link

rpruim commented Jun 15, 2018

This exists already:

library(ggformula)
#> Loading required package: ggplot2
#> 
#> New to ggformula?  Try the tutorials: 
#>  learnr::run_tutorial("introduction", package = "ggformula")
#>  learnr::run_tutorial("refining", package = "ggformula")
library(mosaicData)
gf_point(length ~ width, data = KidsFeet) %>%
  gf_lm(interval = "confidence", fill = "red") %>%
  gf_lm(interval = "prediction", fill = "navy")

Created on 2018-06-15 by the reprex package (v0.2.0).

@nicholasjhorton
Copy link
Author

This looks great. Could it be added to the vignette? https://cran.r-project.org/web/packages/ggformula/vignettes/ggformula.html

@rpruim
Copy link

rpruim commented Jun 16, 2018

I've added something. But I'm not sure the point of the vignette is to show every possible thing that can be done.

I've put this in the section on stats since these are using statistical transformations of the data.

@rpruim rpruim closed this as completed Jun 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants