
Last chance! 50% off unlimited learning
Sale ends in
Generates a shell of documentation for a data set.
promptData(object, filename = NULL, name = NULL)
an R object to be documented as a data set.
usually, a connection or a character string giving the
name of the file to which the documentation shell should be written.
The default corresponds to a file whose name is name
followed
by ".Rd"
. Can also be NA
(see below).
a character string specifying the name of the object.
If filename
is NA
, a list-style representation of the
documentation shell. Otherwise, the name of the file written to is
returned invisibly.
Unless 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.
# NOT RUN {
promptData(sunspots)
unlink("sunspots.Rd")
# }
Run the code above in your browser using DataLab