[R] problem with dataframes

Pau Marc Muñoz Torres paumarc at gmail.com
Thu Oct 8 01:10:47 CEST 2015


Hello everybody,

 I am using the library rapidr of bioconductor, I am running it without
problems as follows;

library("RAPIDR")
makeBinnedCountsFile("SRR611842_2.bam","SRR611842_2.bam.bai","binnecounts.r",mask=NULL,k=20000)
> SampleID=c("SRR611842_2")
> DX=c("T21")
> Gender=c("Male")
> frame= data.frame(SampleID, DX, Gender)

No problems until here , but when i do

> createReferenceSetFromCounts("binnecounts.r",frame)
Loading binned counts file
Checking every sampleID has an outcome
No outcomes for Sample SRR611842_2.bam.bai
*Error in `[.data.frame`(sampleIDs.with.outcomes, , "Gender") :*
*  undefined columns selected*


I do not understand this error, it seems as if the column DX is not read by
the function and I do not know why. I have tried both spellings Dx and DX
with the same result.

I also cheked for the DX columns  doing

> frame
     SampleID  DX Gender
1 SRR611842_2 T21   Male
> frame$DX
[1] T21
Levels: T21
> names(frame)
[1] "SampleID" "DX"       "Gender"


 Can anyone suggest me what to do?


Pau Marc Muñoz Torres
skype: pau_marc
http://www.linkedin.com/in/paumarc
http://www.researchgate.net/profile/Pau_Marc_Torres3/info/

	[[alternative HTML version deleted]]



More information about the R-help mailing list