How to extract specific rows depending on part of the strings in one column in R -
when use r, try extract specific rows have specific strings in 1 column. data structure following
erc1 20679 14959 9770 rab6-interacting protein 2 isoform i want extract rows have rab6 in last column. column still has other words besides rab6 can not use column = "rab6" them. it's search function in excel. have ideas?
assuming data frame df:
df[grep("^rab6", df$column),] if not values start rab6 remove the^.
Comments
Post a Comment