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

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-devel

Reply via email to