Ich benutze roxygen2
um Datensätze für ein Paket zu dokumentieren, das ich entwickle. Ich weiß, Sie können roxygen zur Dokumentation eines Datensatzes verwenden pero Shane's Antwort schlägt letztlich einen Hack vor, den ich zwar lieber vermeiden würde. Also, meine Frage ist:
Wo sollte ich die Roxygen-Dokumentation für Daten ablegen?
Ich habe derzeit eine Datendokumentationsdatei ( anorexia.sub.roxygen
) für einen Anorexie-Datensatz in meinem /R-Ordner
denn soweit ich weiß, ist das die einzige Stelle, an der Roxygen2 danach sucht:
#' Family Treatment Weight change data for young female anorexia patients.
#'
#'
#' The MASS package includes the dataset \code{anorexia}, containing pre and
#' post treatment weights for young female anorexia patients. This is a subset
#' of those data, containing only those patients who received Family Treatment.
#'
#'
#' @name anorexia.sub
#' @docType data
#' @format A dataframe with 17 observations on the following 2 variables, no
#' NAs.
#'
#' \describe{
#'
#' \item{list("Prewt")}{Pretreatment weight of subject, in pounds.}
#'
#' \item{list("Postwt")}{Postreatment weight of subject, in pounds.}
#'
#' }
#' @references Venables, W. N. and Ripley, B. D. (2002) Modern Applied
#' Statistics with S. Fourth edition. Springer.
#' @source Hand, D. J., Daly, F., McConway, K., Lunn, D. and Ostrowski, E. eds
#' (1993) A Handbook of Small Data Sets. Chapman & Hall, Data set 285 (p.
#' 229)
#' @keywords datasets
NULL
roxygen2
erzeugt die Dokumentation problemlos. Aber dann fügt es hinzu anorexia.sub.roxygen.R
zu meinem Collate
Feld in DESCRIPTION
:
Collate:
'granova.R'
'theme-defaults.R'
'granovagg.1w.R'
'granovagg.contr.R'
'granovagg.ds.R'
'help.R'
'anorexia.sub.roxygen.R'
Ich schätze, meine Frage ist: wie kann ich roxygen2
- automatische Erstellung von Datendokumentationen aus Roxygen-Blöcken,
- Fügen Sie die Datendokumentationsdatei NICHT in die
Collate
Anruf, UND - eine Lösung zu vermeiden, die erfordert einen Hack