filtering samples
1
0
Entering edit mode
6 months ago
Bioinfonext ▴ 460

Hi all,

I do have list of samples as a txt file and want to only keep these samples from this large file; column name is samples name in the large file.

> col <- read.table("samples.csv", sep=",", header=FALSE)
> head(col)
      V1
1 DC103R
2 DC110R
3  DC115
4 DC120R
5 DC122R
6  DC124



count <- read.table("betas_1.csv", header=T, sep=",", as.is=T, na.strings="NA")
count[1:5,1:5]

                DC103R     DC110R      DC115      DC120R       DC122R
cg26928153   3.9541963   4.0022695    3.576284   3.6124026   3.5005138
cg16269199   3.1735810   3.2024469    2.532844   2.7646327   3.1078109
cg13869341   3.8688700   3.6512434    2.566684   3.6098174   3.0010929
cg24669183   3.1410903   3.1929830    4.492963   2.6653855   3.4812665

Could you please help me how I can do this.

R statistics • 379 views
ADD COMMENT
0
Entering edit mode
ADD COMMENT
0
Entering edit mode

thanks it is sorted now.

ADD REPLY

Login before adding your answer.

Traffic: 1726 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6