开发者

Roxygen2 introduces \n to default parameter value. Causes Codoc mismatches

I'm having the opposite issues of this post. It seems that roxygen is introducing \n into my default parameter values which causes R CMD check to WARN

Here's my function definition:

WriteToExcel <- function( filePath = stop( "filePath must be specified" ) , worksheet = stop( "worksheet must be specified" ) , toWrite = stop( "toWrite must be specified" ) , rownames = FALSE )
{
 ...
}

And here's the warning:

Codoc mismatches from documentation object 'WriteToExcel':
WriteToExcel
  Code: function(filePath = stop("filePath must be specified"),
                 worksheet = stop("worksheet must be specified"),
                 toWrite = stop("toWrite must be specified"), rownames
                 = FALSE)
  Docs: function(filePath = stop("filePath must be\n specified"),
                 worksheet = stop("worksheet must be\n specified"),
                 toWrite = stop("toWrite must be specified"), rownames
                 = FALSE)
  Mismatches in argument default values:
    Name: 'filePath' Code: stop("filePath must be specified") Docs: stop("filePath must be\n  specif
ied")
    Name: 'worksheet' Code: stop("worksheet must be specified") Docs: stop("worksheet 开发者_开发问答must be\n  spe
cified")

Am I missing something here?


It seems this is a known issue. Closing out this question.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜