R에서 날짜,시간 데이터 인식하는 법 (strptime)
아래와 같은 데이터프레임이 있다고 합시다. date=c("2021-01-01 01:01:01","2021-01-02 02:01:01","2021-01-03 03:01:01","2021-01-04 04:01:01","2021-01-05 05:01:01") x=c(10,20,30,40,50) dt=data.frame(date,x) > dt date x 1 2021-01-01 01:01:01 10 2 2021-01-02 02:01:01 20 3 2021-01-03 03:01:01 30 4 2021-01-04 04:01:01 40 5 2021-01-05 05:01:01 50 > str(dt) 'data.frame':5 obs. of 2 variables: $ date: chr "2021-01-01 01:01:0..
2021. 9. 16.