开发者

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

开发者 https://www.devze.com 2023-04-13 01:19 出处:网络
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

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

精彩评论

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