我想创建一个新的数据框,我从NM中提取每个第二行,其中时间列是相同的。我也想做类似的事情,我也提取每50行。
DF:
NM A File Condition Time
638 -0.0019 No_oil 105min time17-50 13,319s.csv No_oil 125
639 -0.0017 No_oil 105min time17-50 13,319s.csv No_oil 125
640 -0.0017 No_oil 105min time17-50 13,319s.csv No_oil 125
638 -0.0019 No_oil 105min time17-50 13,319s.csv No_oil 105
639 -0.0017 No_oil 105min time17-50 13,319s.csv No_oil 105
640 -0.0017 No_oil 105min time17-50 13,319s.csv No_oil 105
期望的DF:
NM A File Condition Time
638 -0.0019 No_oil 105min time17-50 13,319s.csv No_oil 125
640 -0.0017 No_oil 105min time17-50 13,319s.csv No_oil 125
638 -0.0019 No_oil 105min time17-50 13,319s.csv No_oil 105
640 -0.0017 No_oil 105min time17-50 13,319s.csv No_oil 105
我已经尝试过:NewDF.df< - ODF.df [seq(1,nrow(ODF.df),by = 50),]但因为在新的时间内,它在640,638时变为640,638不行。 感谢。