简体   繁体   English

match.arg(mvnTest)中的错误:“ arg”的长度必须为1

[英]Error in match.arg(mvnTest) : 'arg' must be of length 1

Hi – I wish to run a CFA in r, currently checking off all the assumptions. 您好-我希望在r中运行CFA,目前正在检查所有假设。 I ran into problems when applying the following function: 应用以下功能时遇到问题:

mvn(vdata_clean1, subset = 'NULL', mvnTest = c("mardia", "hz", "royston"), 
covariance = TRUE, tol = 1e-25, alpha = 0.5, scale = FALSE, desc = TRUE, 
transform = "none", R = 1000, 
univariateTest = c("SW"), univariatePlot = c("qq", "persp", "contour"), 
multivariateOutlierMethod = "none", bc = FALSE, bcType = "rounded", 
showOutliers = FALSE, showNewData = FALSE)

I get this error below: 我在下面收到此错误:

Error in match.arg(mvnTest) : 'arg' must be of length 1

Any ideas what I can do to run to function successfully? 有什么想法可以让我成功运行吗? Grateful for any advice :) 感谢任何建议:)

The documentation for the mvnTest argument says: "select one of the MVN tests." mvnTest参数的文档说:“选择一种MVN测试。” You can't do three tests in one call. 您不能在一个呼叫中进行三个测试。 You'll need to call the function three times, once with each test type. 您需要调用该函数三次,每种测试类型一次。

You may have been confused by the help page, which lists mvnTest = c("mardia", "hz", "royston", "dh", "energy") . 您可能对帮助页面感到困惑,该页面列出了mvnTest = c("mardia", "hz", "royston", "dh", "energy") It is a convention in R to list all possibilities, even though only one selection is allowed. R中的约定是列出所有可能性,即使只允许一个选择。 You can't tell this just by looking at the usage, you need to read the rest of the help page (or recognize the error message). 您不能仅通过查看用法就知道这一点,您需要阅读帮助页面的其余部分(或识别错误消息)。

I believe you'll run into the same problem with univariatePlot . 我相信你会碰到同样的问题univariatePlot

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 警告:match.arg中的错误:'arg'必须为NULL或字符向量 - Warning: Error in match.arg: 'arg' must be NULL or a character vector match.arg(regions) 中的错误:“arg”必须为 NULL 或字符向量 - Error in match.arg(regions) : 'arg' must be NULL or a character vector match.arg(opt_crit)中的错误:“ arg”必须为NULL或字符向量 - Error in match.arg(opt_crit) : 'arg' must be NULL or a character vector 运行应用程序时出现闪亮错误:match.arg(position) 中的错误:'arg' 必须为 NULL 或字符向量 - Shiny Error when running App: Error in match.arg(position) : 'arg' must be NULL or a character vector Shiny 应用程序中的“match.arg(position) 错误:‘arg’必须为 NULL 或字符向量” - "Error in match.arg(position) : 'arg' must be NULL or a character vector" in Shiny app match.arg(p.adjust.method)中的错误:“ arg”必须为NULL或字符向量 - Error in match.arg(p.adjust.method) : 'arg' must be NULL or a character vector match.arg(position) 中的闪亮错误:“arg”必须为 NULL 或字符向量 - shiny Error in match.arg(position) : 'arg' must be NULL or a character vector 对多个 arguments 使用 match.arg 时出错 - Error in using match.arg for multiple arguments Rigraph degree()'match.arg中的错误' - R igraph degree() 'Error in match.arg' Python 中的 match.arg 等效项? - match.arg equivalent in Python?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM