Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in R Programming by (7.3k points)
edited by

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 the R CMD check?

1 Answer

0 votes
by
edited by

You can use the \dontrun{} as follows:

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

#'}

Related questions

Browse Categories

...