1

次のコードで roxygenize が失敗し、次のエラー メッセージが表示されます。このトピックに関する他の投稿は、文字の配置が間違っていることを示しています。私は何も悪いことを見つけることができません!問題を特定できますか?

#' My Title. My Description
#'
#' @return A n x n \code{\link{matrix}} where n = the number of variables.  Row and column names are in the same order and are equivalent to the variable names in \samp{timeSeriesData}.  Each entry [i,j] in the matrix is the covariance between variable i and variable j.
#' @callGraphPrimitives
#' @note some notes here
MyFunc = function( timeseriesData ,  method , decayFactor  )
{
}


Error in do.call(paste, c(trimmed.lines, sep = "\n")) :
  variable names are limited to 256 bytes
Calls: roxygenize ... parse.ref.list -> append -> parse.ref -> parse.ref.preref
-> do.call
Execution halted

Edit1
上記のコードは、長い @return 行からいくつかの単語を取り出すと問題なく動作します

Edit2
roxygenize 呼び出しの前に sessionInfo() の結果を追加します。

R version 2.12.2 (2011-02-25)
Platform: i386-pc-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  utils     datasets  grDevices methods   base

other attached packages:
[1] roxygen_0.1-2 digest_0.4.2
4

2 に答える 2

6

これは既知のバグです。roxygen への貢献者である Hadley Wickham に関するこのディスカッションを参照してください。

回避策は、行を短くすることです。#' @return A n x n ...行には約 270 文字 (3 つの文を含む) が含まれているため、簡単に分割できます。

于 2011-04-25T22:41:36.850 に答える
2

もう 1 つの解決策は R2.13.0 にアップグレードすることです。現在、文字の長さの最大値は 256 ではなく 10.000 です。

于 2011-04-26T07:29:56.147 に答える