I'm writing a geocoding function right now that relies on having a Bing Maps Key. Obviously I'd rather not publish mine, and the examples fail without one.
How do I include an example for users to run manually, but not have it executed during R CMD check
?
There are three main ways to run roxygen: roxygen2::roxygenise() . devtools::document() . Ctrl + Shift + D , if you're using RStudio.
Creating Rd FilesUse the File -> New -> R Documentation command in RStudio. This command will allow you to specify the name of an existing function or dataset to use as the basis for the Rd file or alternatively will create a new empty Rd file.
Use \dontrun{}
#'@examples #'\dontrun{ #'geocode("3817 Spruce St, Philadelphia, PA 19104") #'geocode("Philadelphia, PA") #'dat <- data.frame(value=runif(3),address=c("3817 Spruce St, Philadelphia, PA 19104","Philadelphia, PA","Neverneverland")) #'geocode(dat) #'}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With