我有这篇文章的相反问题。似乎 roxygen 正在引入\n
我的默认参数值,这导致 R CMD 检查警告
这是我的函数定义:
WriteToExcel <- function( filePath = stop( "filePath must be specified" ) , worksheet = stop( "worksheet must be specified" ) , toWrite = stop( "toWrite must be specified" ) , rownames = FALSE )
{
...
}
这是警告:
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")
我在这里错过了什么吗?