promptData(object, filename = NULL, name = NULL)
name
followed
by ".Rd"
. Can also be NA
(see below).filename
is NA
, a list-style representation of the
documentation shell. Otherwise, the name of the file written to is
returned invisibly.filename
is NA
, a documentation shell for
object
is written to the file specified by filename
, and
a message about this is given. If filename
is NA
, a list-style representation of the
documentation shell is created and returned. Writing the shell to a
file amounts to cat(unlist(x), file = filename, sep = "\n")
,
where x
is the list-style representation.
Currently, only data frames are handled explicitly by the code.
prompt
promptData(sunspots)
unlink("sunspots.Rd")
Run the code above in your browser using DataLab