Entering edit mode
newbie_R
•
0
@newbie_r-13299
Last seen 7.0 years ago
I have a limma output with 50 different coefficients. I am saving the each coefficient as one individual file by using the following command manually. Is there anyway to automatically save all 50 coefficients with their names? thanks
tab1 <- topTable(fit, n=Inf, coef=1) write.table(tab1, file="tissue1.txt") tab2 <- topTable(fit, n=Inf, coef=2) write.table(tab2, file="tissue2.txt") .....
yes! thank you very much. @Gordon Smyth
@Gordon Smyth One more thing: The values in the write.fit saved file are p-values? because I need both logFC and p values.
If you type help("write.fit") you still find that it does write both logFC and p-values. It writes everything that is in the fit object.
@Gordon Smyth : For some reason, I am getting coeff, t and p-values but not the logFC values.
The coeff are the logFC values.
@Gordon Smyth: Thank you. It has what I needed but I just notice there are no gene names in the saved file. Is there anyway i can keep them? thanks