R 데이터프레임 특정일시 이전 행 제거

1 개요[ | ]

R 데이터프레임 특정일시 이전 행 제거
df <- read.table( header=T, sep=",", stringsAsFactors=FALSE, text="
dt,fruit,ea
2019-06-01 11:00,apple,1
2019-06-03 12:00,apple,1
2019-06-03 13:00,banana,2
2019-06-03 14:00,apple,3
2019-06-04 15:00,banana,4
")
df$dt = as.POSIXct(df$dt)
df <- df[df$dt >= "2019-06-03 13:00",]
df
##                    dt  fruit ea
## 3 2019-06-03 13:00:00 banana  2
## 4 2019-06-03 14:00:00  apple  3
## 5 2019-06-04 15:00:00 banana  4

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}