2023-06-05 14:19 回答问题
检查输入的矩阵是否有Inf值: X = X[apply(X, 1, function(x) sd(x)!=Inf),] X <- X[!apply(is.infinite(X), 1, any), ]