-1

I am just starting out using R, and I am trying to create a False Discovery Rate plot. However, there's an error message that I keep running into that seems very basic. I've search everywhere for a solution but haven't been able to find one.

Here are the inputs and outputs:

> 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

I converted "MelanomaData" from an excel file into a text file. I've searched through the data to make sure that there are no NA's or blank values.

I'm at a lost as to what the problem could be, and any help would be greatly appreciated!

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
bev893
  • 9
  • 1
  • 1
  • 1
    Please read the posting guidelines. As it stands, we don't know what command threw the warning, we don't know what package your functions came from, and we have no data to compare against. – Carl Witthoft Jan 16 '15 at 16:47
  • See [this thread](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) for help creating a reproducible example. – Kara Woo Jan 16 '15 at 17:11

1 Answers1

0

I am seeing two helpful messages here. The first is Warning: a class contains only 1 sample. The second says Error in quantile.default(sd, offset.percent/100).

The first argument of quantile.default sounds like 'standard deviation'.

What about this possibility: Your code computes the sd of a one-element vector, which is NA, which quantile.default cannot use because nobody told it to ignore it?

I suggest you go and find out what produces the warning.

Lutz Prechelt
  • 36,608
  • 11
  • 63
  • 88