[BioC] basic R question

Steve Lianoglou mailinglist.honeypot at gmail.com
Tue Apr 24 01:08:58 CEST 2012


Hi,

On Mon, Apr 23, 2012 at 6:55 PM, Jing Huang <huangji at ohsu.edu> wrote:
> Hi Expert!
>
> I am trying to get rid of the features that contain more than half of samples with NA data. Could you help me?
>
> Here is the example.
>
>
>> head(exprs(eset.vsn))

How about:

R> ae <- exprs(eset.vsn)
R> good <- ae[rowSums(is.na(ae)) / ncol(ae) < 0.5, ]

HTH,
-steve

>
>           GSM48598  GSM48617  GSM48600  GSM48601  GSM48602  GSM48604  GSM48607  GSM48608  GSM48614  GSM48616  GSM48599  GSM48603  GSM48605  GSM48606  GSM48609  GSM48615
>
> 1000_at   11.324097 10.881484 11.004342 10.649591 11.196320 11.405016 11.159627 11.144816 11.280698 11.008774 11.158076 10.083978 11.024338 10.641091 10.508528 10.836564
>
> 1001_at    6.503407  6.940207  7.776485  6.744207  8.393132  7.994422  7.417291  8.383466  8.278285  8.476460  7.702632  7.811951  6.955951  8.490921  6.632979  7.751188
>
> 1002_f_at  6.682602  6.320622        NA  7.503875  5.969647        NA  5.394164  6.293754  7.140539  5.791176  5.493847  8.379308  8.163210  6.900236  6.384235  6.620342
>
> 1003_s_at  8.113777  7.298421        NA        NA        NA        NA        NA        NA        NA        NA        NA  8.243218        NA        NA        NA        NA
>
> 1004_at    7.133844  7.052989  6.986067        NA        NA        NA        NA        NA  6.712877  7.176983        NA        NA  7.252336        NA        NA        NA
>
> 1005_at    8.600065 13.149781  8.636922  8.862644 11.790418  6.276165 10.805382  6.908298 12.894008 10.353165  8.762901  8.135442        NA  9.235085        NA 10.925639
>
>>
>
>
>
> Many many thanks
>
>
> Jing
>
>
> OHSU
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor



-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact



More information about the Bioconductor mailing list