listExamples | R Documentation |
listExamples lists all the examples in a package R file. It comments out the first line number and any dontrun statements along with their following curly bracket.
listExamples(infile)
infile |
|
Creates an R file in the working directory and prints its name to the console
## Not run:
txt <- vector("character",4)
txt[1] <- "#' @examples "
txt[2] <- "#' /dontrun{"
txt[3] <- "#' print("This is an example of using listExamples")"
txt[4] <- "#' }"
infile <- textConnection(txt)
listExamples(infile)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.