Entering edit mode
5.5 years ago
anamaria
▴
220
Hi,
I have two data frames:
> head(df2)
ILMN_1658176 ILMN_1794782 ILMN_2329927 ILMN_2338268
DwoC_2318_norm 4.895369 7.354273 5.788415 4.732194
DwoC_3395_norm 4.769932 6.718184 5.338058 4.680381
DwoC_6154_norm 4.944610 7.001293 5.351585 4.456892
DwoC_16362_norm 4.637149 5.774219 4.720364 4.687178
DwoC_18296_norm 4.738705 6.941641 5.472976 4.843630
DwoC_21183_norm 4.883878 7.481384 5.755646 4.505568
> head(df1)
ILMN_1658176 ILMN_2329927 ILMN_1794782 ILMN_2338268
GTEX-1122O 7.06228526333386 7.06228526333386 7.06228526333386 3.57044703372789
GTEX-11EM3 6.05973723132698 6.05973723132698 6.05973723132698 3.4268959808612
GTEX-11EMC 6.38938647129766 6.38938647129766 6.38938647129766 3.47843984281137
GTEX-11EQ9 6.24361469623367 6.24361469623367 6.24361469623367 3.51276310600448
GTEX-11I78 4.56890242439573 4.56890242439573 4.56890242439573 3.48287352055029
GTEX-11OC5 7.26717305438927 7.26717305438927 7.26717305438927 3.34892592791344
I tried to do rbind via:
library(data.table)
a=rbindlist(list(df1, df2), fill = TRUE)
but in my data frame "a" rownames are not present. How do I do rbind and keep them?
Thanks Ana
Thank you so much, this worked great!