How to not run an example using roxygen2?

Ari B. Friedman

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?

GSee

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)
#'}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Location of files when using @example tag with roxygen2

How do you escape "}" using roxygen2?

How to acknowledge contributors of ideas (not code) to R package (using roxygen2)?

How to properly document S4 class slots using Roxygen2?

R Package Doc (roxygen2) - example part - execute example

CRAN note when using roxygen2 template

Documentation of internal helper function using `roxygen2`

R and roxygen2: How to document data files in inst/extdata?

Expanding the basic methods for a R class and how to document with roxygen2?

How do I run a project's example using Cargo?

Same function but with two different names in an R package using roxygen2?

Exporting non-S3-methods with dots in the name using roxygen2 v4

Error using Travis CI with R package: 'roxygen2' >= 5.0.0 must be installed for this functionality

Is there anyway to document S4 class and its constructor separately using Roxygen2

Run ArUco example using Cmake

How do I format roxygen2 return list similar to parameter list?

R with roxygen2: How to use a single function from another package?

How do I use a variable's value inside roxygen2 documentation?

How example can be run in test?

How to run BlocObserver example in cli

How do I use the Find function with a variable term, for example Run1, Run2, RunX

Simplest example of parallel run using OpenMP

Unable to run example code using Quantlib on Mac

How is the PUT request in this example using subresource is processed by JAX-RS run time?

How to resolve DNS lookup error when trying to run example microservice application using minikube

How can I lemmatize english words (example: 'run' and 'ran') using R to bring them all to the same tense?

How to run valgrind with basic c example?

How to run npm 'filestream' example code?

How to run the IPFS example below in node?