[Rd] brackets in prompt.data.frame (PR#2676)
Torsten.Hothorn at rzmail.uni-erlangen.de
Torsten.Hothorn at rzmail.uni-erlangen.de
Mon Mar 24 17:35:33 MET 2003
prompt.data.frame produces Rd-code with unbalanced brackets:
data(iris)
prompt(iris, filename=NA)
gives
...
$format
[1] "\\format{"
[2] " A data frame with 150 observations on the following 5 variables."
[3] " \\describe{"
[4] " \\item{Sepal.Length}{a numeric vector}"
[5] " \\item{Sepal.Width}{a numeric vector}"
[6] " \\item{Petal.Length}{a numeric vector}"
[7] " \\item{Petal.Width}{a numeric vector}"
[8] " \\item{Species}{a factor with levels}"
[9] " \\item{Species}{\\code{setosa} }"
[10] " \\item{Species}{\\code{versicolor} }"
[11] " \\item{Species}{\\code{virginica} }"
[12] "}"
where the closing bracket to "describe" is missing. The fix seems simply
changing
fmt <- c(fmt, "}")
to
fmt <- c(fmt, " } \n } ")
in line 208 of "prompt.R".
Torsten
More information about the R-devel
mailing list