| usage {formatR} | R Documentation |
Print the reformatted usage of a function. The arguments of the function are
searched by argsAnywhere, so the function can be either
exported or non-exported in a package. S3 methods will be marked.
usage(FUN, width = getOption("width"), tidy = TRUE, output = TRUE)
FUN |
the function name |
width |
the width of output (passed to |
tidy |
whether to reformat the usage code |
output |
whether to write the output to the console (via
|
The R code for the usage is returned as a character string (invisibly).
library(formatR)
usage(var)
usage(plot)
usage(plot.default) # default method
usage("plot.lm") # on the 'lm' class
usage(usage)
usage(barplot.default, width = 60) # narrower output