更新时间:2023-09-23 13:23:40
使用grep,您可以找到找到您的模式的行的索引:
Using grep, you can locate the indexes of the rows where your pattern is found:
ind=grep("^GMT",df$type)
然后,您只能保留两个索引之间的行:
Then you can keep only the rows between the two indexes:
df=df[ind[1]:ind[2],]