[R] can not extract rows which match a string
Ana Marija
@okov|c@@n@m@r|j@ @end|ng |rom gm@||@com
Thu Oct 3 20:58:55 CEST 2019
Hello,
I have a dataframe (t1) with many columns, but the one I care about it this:
> unique(t1$sex_chromosome_aneuploidy_f22019_0_0)
[1] NA "Yes"
it has these two values.
I would like to remove from my dataframe t1 all rows which have "Yes"
in t1$sex_chromosome_aneuploidy_f22019_0_0
I tried selecting those rows with "Yes" via:
t11=t1[t1$sex_chromosome_aneuploidy_f22019_0_0=="Yes",]
but I got t11 which has the exact same number of rows as t1.
If I do:
> table(t1$sex_chromosome_aneuploidy_f22019_0_0)
Yes
620
So there is for sure 620 rows which have "Yes". How to remove those
from my t1 data frame?
Thanks
Ana
More information about the R-help
mailing list