This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to make input data R packge limma

Hi everybody!

I am bi beginner

I practice DEG analysis using R packages (Limma)

so I try some sample tutorial

limma used two input data

one is Expression data(I already made)

another is group data

so I check tutorial sample group data this

>grp
[1] Human Lung Tumor   Human Lung Control Human Lung Tumor   Human Lung Control
[5] Human Lung Tumor   Human Lung Tumor   Human Lung Control Human Lung Tumor
[9] Human Lung Control Human Lung Tumor   Human Lung Control Human Lung Tumor
[13] Human Lung Control Human Lung Tumor   Human Lung Control Human Lung Tumor
>str(grp)
 Factor w/ 2 levels "Human Lung Control",..: 2 1 2 1 2 2 1 2 1 2 ...

but I try cannot , how to make like this input group data

I already make csv.file

when I use read.csv, very different character

below my csv file

Human Lung Tumor
Human Lung Control
Human Lung Tumor
Human Lung Control
            ....

so when I read csv file

               x
1    Human Lung Tumor
2  Human Lung Control
3    Human Lung Tumor
4  Human Lung Control
5    Human Lung Tumor
6    Human Lung Tumor
7  Human Lung Control
8    Human Lung Tumor
9  Human Lung Control

how to make and read group file ?

plz help me

r rna-seq

1 answer

Hi,

If I understand correctly, this is what you need

file = read.csv("groupdata.csv")
group =  factor(file$x, levels=c("Human Lung Tumor","Human Lung Control"))

thank u for ur advice! thank u so much !!

Log in to answer this question.