Removing rows with * prefixed string

前端 未结 5 1922
故里飘歌
故里飘歌 2021-01-27 06:22

I have a data frame which is as given below

85  P   74  P   70  P   35  P   38  P   54
49  P   35  P   30  P   50  P   30  P   30
104 P   69  P   50  P   70  P           


        
5条回答
  •  故里飘歌
    2021-01-27 06:49

    something like this :

    df2<-df[!apply(df,1,function(rg){any(grepl("^\\*[a-zA-Z1-9]",rg))}),]
    

    should work

提交回复
热议问题