Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 205278

R - date format after cbind

$
0
0

I have a dataframe column that looks like:

> head(merged_2$ReferenceDate)
[1] "2008-03-31 UTC""2008-03-31 UTC""2010-03-31 UTC""2010-06-30 UTC""2008-03-31 UTC"
[6] "2008-03-31 UTC"

but when I use cbind to get:

test <- cbind(merged_2$ReferenceDate)
> head(test[,1])
[1] 1206921600 1206921600 1269993600 1277856000 1206921600 1206921600

How can I get the dates to appear as dates and not as numbers?

> typeof(merged_2$ReferenceDate)
[1] "double"> typeof(test[,1])
[1] "double"

Viewing all articles
Browse latest Browse all 205278

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>