Adelchi, Since % is the LaTeX comment character, you may want to try escaping it.
Peter Ehlers On 2011-01-16 02:35, Adelchi Azzalini wrote:
[Hope this is the right list where to send...] An attempt to update package 'mnormt' involves the addition of a small new function called 'pd.solve'. When I come to the package checking stage, an error occurs in parsing pd.solve.Rd. The full transcript of the outcome is copied below (it includes details on my installation) but the critical point is where the \examples{} section includes a %*%. The relevant portion of the source file is \examples{ x<- toeplitz(rev(1:4)) x.inv<- pd.solve(x) print(x.inv %*% x) logDet<- attr(x.inv, "log.det") print(abs(logDet - determinant(x, logarithm=TRUE)$modulus)) } which leads to the message ### ** Examples > > x<- toeplitz(rev(1:4)) > x.inv<- pd.solve(x) > print(x.inv + logDet<- attr(x.inv, "log.det") Error: unexpected symbol in: " print(x.inv logDet" When I install the package, it works, except that the documentation portion looks like: Examples x<- toeplitz(rev(1:4)) x.inv<- pd.solve(x) print(x.inv logDet<- attr(x.inv, "log.det") print(abs(logDet - determinant(x, logarithm=TRUE)$modulus)) It seems that the examples are parsed as ordinary text, not R commands. I am really puzzled. Any explanation? Adelchi Azzalini
[... snip ...] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.