Description Usage Arguments Value Author(s) Examples
This function gets a function and writes the skeleton of the documentation in roxygen syntax. The call of this function assumes that the working directory is a package directory, that is, where DESCRIPTION file is.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
object |
An object that is a function. |
file |
character[1] An optional file name to write the
documentation into. If it is not provided, the name of the
function is used to name the file. If |
export |
logical[1] If |
author |
character[1] The author of the function to be assigned
to the |
keywords |
character[>=1] Keywords to the function that will be
assigned to the |
extra |
character[1] Additional information to be written, for
example |
editor |
character[1] A name of an editor to open the file after
its creation. See |
print |
logical[1] If |
append |
logical[1] If |
find_file |
logical[1] If |
source |
character[1] A string that is the source of the
dataset. Only has effect for |
This function does not have return value. It only creates/modifies files and prints content.
Walmes Zeviani, walmes@ufpr.br.
Walmes Zeviani, walmes@ufpr.br.
Walmes Zeviani, walmes@ufpr.br.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | ## Not run:
#-----------------------------------------
# Using roxy_fun().
fun <- function(x, y, ...) {
return(x + y)
}
file.remove("bla.R")
file.remove("fun.R")
roxy_fun(fun)
roxy_fun(fun, append = TRUE)
file.remove("fun.R")
roxy_fun(fun, find_file = TRUE)
file.remove("fun.R")
roxy_fun(fun, editor = "emacs")
roxy_fun(fun, file = NA)
file.remove("fun.R")
roxy_fun(fun, print = TRUE)
file.remove("fun.R")
roxy_fun(fun, export = FALSE)
file.remove("fun.R")
roxy_fun(fun, author = "Walmes Zeviani, \\email{walmes@ufpr.br}.")
roxy_fun(fun, file = "bla.R")
file.remove("bla.R")
roxy_fun(fun, file = "bla.R", extra = "@import lattice")
file.remove("fun.R")
roxy_fun(object = fun, editor = "emacs")
## End(Not run)
## Not run:
#-----------------------------------------
# Using roxy_data().
s <- "Smith; Sanders (1234)"
file.remove("iris.R")
roxy_data(iris,
print = TRUE,
source = s,
editor = "emacs",
keywords = c("BLA", "BLU"),
find_file = TRUE,
extra = c("@docType dataset",
"@details bla bla bla"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.