Hi,
I like the aggregate version. Here is an implementation with sapply and
apply:
> data
X2 gbm_tcga lusc_tcga ucec_tcga_pub
1 gbm_tcga 1.0 0.14053719 -0.102847164
2 gbm_tcga 1.0 0.04413434 0.013568055
3 gbm_tcga 1.0 -0.200
Thanks JS
I think aggregate function is better.
Karim
Le 17 févr. 2015 08:33, "JS Huang" a écrit :
> Hi,
>
> I hope that someone can provide a better way to implement it. This is my
> implementation.
>
> > data
> X2 gbm_tcga lusc_tcga ucec_tcga_pub
> 1 gbm_tcga 1.000
Hi,
I hope that someone can provide a better way to implement it. This is my
implementation.
> data
X2 gbm_tcga lusc_tcga ucec_tcga_pub
1 gbm_tcga 1.0 0.14053719 -0.102847164
2 gbm_tcga 1.0 0.04413434 0.013568055
3 gbm_tcga 1.00
4
Cheers
Petr
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Karim
> Mezhoud
> Sent: Monday, February 16, 2015 4:10 PM
> To: r-help@r-project.org
> Subject: [R] compute values by condition in DF by rownames
>
> Hi All,
&
Hi All,
how to compute only abs(value) > 0.2 of DF
X2 gbm_tcga lusc_tcga ucec_tcga_pub
gbm_tcga 1.0 0.1405371906 -0.1028471639
gbm_tcga 1.0 0.0441343447 0.0135680550
gbm_tcga 1.0 -0.2000397119 0.0389718175
gbm_tcga 1.0 0.
5 matches
Mail list logo