I have two file:
first file is single column file with header (
file1$sample
), contain 200 samples/line.second is multi column and multiple rows:
dim(file2) #[1] 652 20206
I want to match file1$sample and file2$sample and extract matrix (200*20206).
I tried following command:
new <- merge(file1, file2, by.x='sample', by.y='sample')
but is gives only single line file
dim(new)
#[1] 0 20206
So please help me how can I extract (200*20206) matrix.
Thanks