Reading numeric Date value from CSV file to data.frame in "R"
Posted
by Dick Eshelman
on Stack Overflow
See other posts from Stack Overflow
or by Dick Eshelman
Published on 2010-04-13T06:31:06Z
Indexed on
2010/04/13
6:32 UTC
Read the original article
Hit count: 297
D <- read.csv("sample1.csv", header = FALSE, sep = ",")
D V1 V2 V3 V4 1 20100316 109825 352120 239065 2 20100317 108625 352020 239000 3 20100318 109125 352324 241065
D[,1] [1] 20100316 20100317 20100318
In the above example how do I get the data in D[,1] to be read, and stored as date values: 2010-03-16, 2010-03-17, 2010-03-18 ? I have lots of data files in this format.
TIA,
© Stack Overflow or respective owner