u <- get_usage(lm) # a long usage text
cat(u)
# if there are additional arguments in S3 methods,
# use names of the functions, not the objects, e.g.
get_usage("droplevels",S3class="data.frame")
get_usage(name="droplevels",S3class="data.frame")
# (both give "\method{droplevels}{data.frame}(x, except = NULL, \dots)")
# but this gives the args of the generic: "\method{droplevels}{data.frame}(x, \dots)"
get_usage(droplevels,S3class="data.frame")
Run the code above in your browser using DataLab