“对“哪个"不合逻辑"的争论是什么? FactoMineR MCA是什么意思? [英] What does "argument to 'which' is not logical" mean in FactoMineR MCA?
问题描述
我正在尝试使用FactoMineR在数据表上运行MCA.它仅包含0/1个数字列,其大小为200.000 * 20.
I'm trying to run an MCA on a datatable using FactoMineR. It contains only 0/1 numerical columns, and its size is 200.000 * 20.
require(FactoMineR)
result <- MCA(data[, colnames, with=F], ncp = 3)
我收到以下错误:
其中(unlist(lapply(listModa,is.numeric)))的错误: 哪个"的参数不合逻辑
Error in which(unlist(lapply(listModa, is.numeric))) : argument to 'which' is not logical
我真的不知道该怎么办.然后,我尝试将每一列都转换为字符,然后一切正常.我认为这可能对其他人有用,也许有人可以向我解释该错误;)
I didn't really know what to do with this error. Then I tried to turn every column to character, and everything worked. I thought it could be useful to someone else, and that maybe someone would be able to explain the error to me ;)
欢呼
推荐答案
没有进一步的输入就很难分辨,但是您可以做的是:
It's difficult to tell without further input, but what you can do is:
- 找到发生错误的功能(通过
traceback()
), -
设置一个断点并对其进行调试:
- Find the function where the error occurred (via
traceback()
), Set a breakpoint and debug it:
trace(tab.disjonctif, browser)
我做了以下操作(离线)来找到tab.disjonctif
的名称:
I did the following (offline) to find the name of tab.disjonctif
:
- 在CRAN镜像上在GitHub上找到包
- 搜索会给出错误
- Found the package on the CRAN mirror on GitHub
- Search for that particular expression that gives the error
这篇关于“对“哪个"不合逻辑"的争论是什么? FactoMineR MCA是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!