next up previous contents index
Next: Compile the Package Up: Build R Package Previous: Documenting R Functions   Contents   Index

Documenting Data Sets

Suppose I have a data frame called FG, which looks like5.2:
> FG
          FOO          GOO
1  -0.1646470  0.204260905
2  -1.2444621 -1.827261659
3  -0.8822063  0.499977046
4  -0.8628432  0.445908205
5  -0.5528232  0.732852476
6  -1.0124162  0.206794752
7  -1.6423894  2.322223652
8   1.1509125 -2.139585291
9   1.6897148 -0.006194043
10  0.5261203  0.613050939
I can then do:
> prompt(FG)
which created a file FG.Rd that has the contents:
\name{FG}
\alias{FG}
\non_function{}
\title{ ~~ 1-line description of the data frame ~~ }
\usage{data(FG)}
\description{
The \code{FG} data frame has 10 rows and 2 columns.
~~ Give a concise description here ~~
}
\format{
  This data frame contains the following columns:
  \describe{
    \item{FOO}{a numeric vector}
    \item{GOO}{a numeric vector}
  }
}
\details{
 ~~ If necessary, more details than the _description_ above ~~
}
\source{
 ~~ reference to a publication or URL from which the data were obtained ~~
}
\references{
~~ possibly secondary sources and usages ~~
}
\examples{
data(FG)
## maybe str(FG) ; plot(FG) ...
}
\keyword{datasets}
You can then modify this file. Please refer to Writting R Extensions for more details on how to edit this file.

Ko-Kang Wang 2002-10-10