i want import excel file in r. file has columns such jan-13, jan14 , on. these column headers. when import data using readxl package, default converts date numbers. columns should dates numbers. using code :
library(readxl) data = read_excel("filename", col_names = true, skip = 0) can please help?
the date information still there. it's in wrong format. should work:
names(data) <- format(as.date(as.numeric(names(data), origin="1899-01-01")), "%b%d")
Comments
Post a Comment