R Date conversion from factor -


i have factor of date given in number origin 1899-12-30, e.g.

dat1 <- factor(42648) 

if want change date format, i'd do

as.date(dat1, origin="1899-12-30") 

but conversion requires format. doing

as.date(as.numeric(as.character(dat1)), origin="1899-12-30") 

works seems little on top. there shorter way?


Comments

Popular posts from this blog

php - Auto increment employee ID -

php - isset function not working properly -

python - Evaluating the next line in a For Loop while in the current iteration -