Learn R Programming

formatR (version 0.10)

usage: Show the usage of a function

Description

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

usage(FUN, width = getOption("width"))

Arguments

FUN
the function name
width
the width of output (passed to width.cutoff in tidy.source)

Value

  • NULL; the usage is printed on screen

See Also

tidy.source

Examples

Run this code
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

Run the code above in your browser using DataLab