ProjectMOSAIC / mosaic

Project MOSAIC R package
http://mosaic-web.org/
93 stars 26 forks source link

need a new ggformula vignette (or at least mention in the graphics vignette) #664

Closed nicholasjhorton closed 7 years ago

nicholasjhorton commented 7 years ago

I've stubbed out a lattice/ggformula conversion document that I would propose to include as a new vignette (see https://github.com/ProjectMOSAIC/mosaic/commit/23df4165785c827509236136ec0c153cf573a4e9 and https://github.com/ProjectMOSAIC/mosaic/blob/beta/vignettes/ggformula-lattice.Rmd). Comments and suggestions welcomed.

nicholasjhorton commented 7 years ago

I've pushed some additions to the vignette.

rpruim commented 7 years ago

I just surrounded all = with spaces on either side. (There is a reason the space bar is the biggest key...)

Also changed theme for ggplot2.

rpruim commented 7 years ago

I don't like leaving data = to last in complex plots. The template is goal( y ~ x, data =, ...) not goal(y ~ x, ..., data =).

Can we switch this globally in the vignette?

nicholasjhorton commented 7 years ago

I don't object.

rpruim commented 7 years ago

OK. I'll do this in a moment.

rpruim commented 7 years ago

I like this example, but the long lines are bad. I've inserted multi-line strings instead. The only downside is that you have to left justify the second line to avoid getting unwanted white space in the results.

gf_point(cesd ~ age, data = HELPrct,
         color = ~ sex) %>%
  gf_lm() %>% 
  gf_theme(legend.position = "top") %>% 
  gf_labs(title = "This is my plot", 
    x = "age (in years)", 
    y = "CES-D measure of
depressive symptoms")
rpruim commented 7 years ago

@nicholasjhorton, should we close this? Anything we want to add? Should there be any additional text. (After the intro, is basically just code examples comparing the two systems.)

nicholasjhorton commented 7 years ago

I'm ready to close this (we can always add to it later).

rpruim commented 7 years ago

I've move this vignette to ggformula. That seems like the right place for it.

nicholasjhorton commented 7 years ago

That's fine as long as there's a pointer added to this in the mosaic-resources.Rmd file.

rpruim commented 7 years ago

Go ahead and add the pointer. I'll pull it in before submitting.

nicholasjhorton commented 7 years ago

What URL should I use?

rpruim commented 7 years ago

https://cran.r-project.org/package=ggformula/vignettes/ggformula-lattice.pdf

It will likely throw a bad URL note, but we can explain. Or I may submit mosaicCore and ggformula first so mosaic can check properly.

rpruim commented 7 years ago

Make sure all the other urls have package = syntax. Although these get redirected (so they are a pain to copy and paste from a browser), CRAN requires this format to avoid NOTES.

nicholasjhorton commented 7 years ago

Done via https://github.com/ProjectMOSAIC/mosaic/commit/ea09981abf5a5e11bf5b710c279b52535905bf4f

I'm not sure what URL's you are referring to: can you let me know what else is needed?

rpruim commented 7 years ago

Any URLs that refer to files on CRAN associated with a package.

We may be clean already.

rpruim commented 7 years ago

Ack. We may need to revert. It appears that vignettes cannot use reverse dependencies:

Rebuilding ggformula-lattice.Rmd
Failed with error:  'package 'ggformula' required by 'mosaic' could not be found'
Quitting from lines 24-33 (ggformula-lattice.Rmd) 

Apparently the ggformula package doesn't exist sufficiently when the vignette tries to load mosaic