This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Using pamr.train to find Shrunken Centroid

I have recently started learning how to use R, and I am trying to create an False Discovery Rate plot for my data. I loaded the "pamr" package, and am using a data set with 11 columns: column 1 is a list of Gene IDs, column 2 is a list of Gene Symbols, and columns 3-11 are the dependency rates of different samples.

I converted my excel file into a text file and ran it in R using this input:

> m.data <- pamr.from.excel("MData.txt", 11, sample.labels=TRUE)

I then ran:

> m.train <- pamr.train(m.data)

I received this error message:

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 am at a complete lost as to what I should do. I've checked to make sure that there are no missing values in my data, but I have no idea what to do next.

EDIT: I should mention that Row 1 contains the class labels (NRas Dependent or NRas Independent), and Row 2 contains the sample labels, of which there are 9.

r

1 answer

In case any one else in the future has a similar issue, I've figured out what I did wrong.

The warning says: "a class contains only 1 sample". I realized that my Rows 1 and 2 should be switched; this means that row 1 should contain the sample labels, and row 2 should contain the class labels.

Log in to answer this question.