[英]PCA in R: Error in svd(x, nu=0, nv=k) : Infinite or missing values in 'x'
My dataframe contains about 26k rows with 129 variables.我的 dataframe 包含大约 26k 行和 129 个变量。 I've made sure all of the variables are numeric and do not have any NA values (used na.omit).
我确保所有变量都是数字的并且没有任何 NA 值(使用 na.omit)。 Using the function prcomp() on my dataframe tells me "Infinite or missing values in x".
在我的 dataframe 上使用 function prcomp() 告诉我“x 中有无限或缺失值”。 What might I be overlooking then?
那我可能会忽略什么?
Did you also make sure none of them are infinite?您是否还确保它们都不是无限的? As that's the other part of that message?
因为那是那条信息的另一部分?
Easily check all this with:通过以下方式轻松检查所有这些:
all( is.finite( your.data.frame ) )
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.