I am interested to know how can i access vector of a column in phenotype data frame if i don't know the conditions(groups) name in the phenotype data frame . I have phenotype information in the below file
Files Groups
GSM248652.CEL A
GSM248655.CEL A
GSM248238.CEL A
GSM248650.CEL B
GSM248651.CEL B
GSM248661.CEL C
GSM248660.CEL C
Here in the above file i have Groups column and i normally access it and design a model matrix by
pdata = read.AnnotatedDataFrame("file.txt",sep="") unique <- unique(pdata$Groups) f <- factor(pdata$Groups, levels=unique) design <- model.matrix(~0+f) colnames(design) <- unique
Now i don't know the column name of conditions(groups), how to access and design a model matrix. Help appreciated.
It works, thank you very much