[Roxygen-devel] S4 class name ending with \n
Manuel J. A. Eugster
Manuel.Eugster at stat.uni-muenchen.de
Sun Sep 26 10:21:48 CEST 2010
Hi Laurent,
thank you for this patch and the TODO-tag patch; I'll check them
and add them into the package in near future!
Best,
Manuel.
On 9/24/10 6:43 PM, Laurent Gatto wrote:
> Dear all,
>
> Using the svn version of roxygen and a recent R-devel version (see
> sessionInfo() output below), the name of an S4 class is followed by a
> new line '\n' in the roclet, which effectively generates an
> Myclass\n-class.Rd documentation file. I have modified the guess.name
> function in the roclet.R file as shown in the diff output below.
>
>
> --- roclet.R 2010-09-24 17:36:10.010053441 +0100
> +++ roclet.R~ 2010-09-24 17:35:27.490072340 +0100
> @@ -115,11 +115,11 @@
> #' @param partitum the parsed elements
> #' @return The guessed name (possibly \code{NULL})
> guess.name<- function(partitum)
> - sub("\n$","",first.non.null(partitum$name,
> - partitum$assignee,
> - partitum$S4class,
> - partitum$S4method,
> - partitum$S4generic))
> + first.non.null(partitum$name,
> + partitum$assignee,
> + partitum$S4class,
> + partitum$S4method,
> + partitum$S4generic)
>
> I'm not sure if this was the best place to trim the \n, but it fixes
> at least temporally my issues.
>
> Hope this helps.
>
> Best wishes,
>
>
> Laurent
>
> sessionInfo()
> R version 2.13.0 Under development (unstable) (2010-09-19 r52946)
> Platform: x86_64-unknown-linux-gnu (64-bit)
>
> locale:
> [1] LC_CTYPE=en_GB.utf8 LC_NUMERIC=C
> [3] LC_TIME=en_GB.utf8 LC_COLLATE=en_GB.utf8
> [5] LC_MONETARY=C LC_MESSAGES=en_GB.utf8
> [7] LC_PAPER=en_GB.utf8 LC_NAME=C
> [9] LC_ADDRESS=C LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_GB.utf8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] tools stats graphics grDevices utils datasets methods
> [8] base
>
More information about the Roxygen-devel
mailing list