[R-pkg-devel] Nit-picky vignette questions

Roy Mendelssohn - NOAA Federal roy.mendelssohn at noaa.gov
Thu Dec 8 21:43:08 CET 2016


Hi All:

In writing a vignette and referring to a function in another package,  say the function info() in the rerddap package,  it it better to refer to it as the "rerddap function info()" or as "rerddap::info()". This is for the vignette, not what I do internally.

Similarly in a code example in a vignette, if I am using the ggplot2 function ggplot(),  which would preferable  (this is a non-working example just to show the alternative)

   require(ggplot2)
   junk <- ggplot()


or

  junk <- ggplot2::ggplot()

Yes these are nitpicky questions,  but as long as I am doing a vignette, I might as well try to do all of it in a way that is recommended or preferable.

Thanks for any thoughts,

-Roy

PS - Is there something like the Python related program flake8 for R code?   I have both Google and Hadley's style recommendations,  but it is nice  (though tedious and painful) to have a program that points out any inconsistencies from a recommended standard

**********************
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
**********************
Roy Mendelssohn
Supervisory Operations Research Analyst
NOAA/NMFS
Environmental Research Division
Southwest Fisheries Science Center
***Note new street address***
110 McAllister Way
Santa Cruz, CA 95060
Phone: (831)-420-3666
Fax: (831) 420-3980
e-mail: Roy.Mendelssohn at noaa.gov www: http://www.pfeg.noaa.gov/

"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected" 
"the arc of the moral universe is long, but it bends toward justice" -MLK Jr.



More information about the R-package-devel mailing list