我刚开始使用R,并且我试图创建一个错误发现率图。然而,有一条我经常遇到的错误消息似乎非常基本。我到处寻找解决方案,但没有找到。
以下是输入和输出:
> melanoma.data <- pamr.from.excel("MelanomaData.txt", 10, sample.labels=FALSE)
pamr.menu(melanoma.data)
1: pamr.train
2: pamr.cv
3: pamr.plotcv
...(other selections)
Selection: 1
Warning: a class contains only 1 sampleError in quantile.default(sd, offset.percent/100) :
missing values and NaN's not allowed if 'na.rm' is FALSE
Error during wrapup: cannot open the connection
我把"MelanomaData“从excel文件转换成了文本文件。我已经对数据进行了搜索,以确保没有NA或空白值。
我不知道问题可能是什么,任何帮助都将不胜感激!
发布于 2015-01-17 02:44:27
我在这里看到了两条有用的消息。第一个是Warning: a class contains only 1 sample
。第二个说Error in quantile.default(sd, offset.percent/100)
。
的第一个参数quantile.default
听起来像“标准差”。
这种可能性如何:您的代码计算sd
一个元素向量,它是NA
,其中quantile.default
不能使用,因为没有人告诉它忽略它?
我建议您去找出产生警告的原因。
https://stackoverflow.com/questions/27988411
复制相似问题