[R] Affy: problems using neweS

From: John Tillinghast <tilling_at_gmail.com>
Date: Sat 19 Aug 2006 - 06:43:52 EST


At least for R 2.3.1, neweS requires that all of the variables have "names" that correspond to the "colnames" of the matrix. That's fine, I know about that, and I use a modified version of neweS that puts the names in there. It works well with data from most sources.

However, we tried reading in the matrix from a text file, and again get an error that says sampleNames differ from phenoData rows. What's going on?

Modified neweS:

"neweS" <-
function(mat, vlist, vlabel=as.list(names(vlist))){ names(vlabel)=names(vlist)

#Must add appropriate names to the variables in vlist for R 2.3compatibility. for (i in 1:length(vlist)) {
  names(vlist[[i]]) <- colnames(mat)
}

###

pdata <- new("phenoData", pData=as.data.frame(vlist), varLabels=vlabel) eset <- new("exprSet", exprs=as.matrix(mat), phenoData=pdata) return(eset)
}

I believe this is identical to the existing neweS except for the part between the #s.

We're stumped here, I'm grateful for any ideas!

Thanks
John Tillinghast

        [[alternative HTML version deleted]]



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sat Aug 19 06:49:23 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 19 Aug 2006 - 08:20:51 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.