Skip to content
Prev 13745 / 15274 Next

write.csv conversion problem

Peter,

Dates are always stored as integers, so that is expected. You would need to use as.character() to convert the date before you output it to the file, but then it won't be of type double. 

Also, thee is a general r-help list where these types of questions should go. 

Thanks,,

Roger
On March 10, 2016, at 5:44 AM, Peter Neumaier <peter.neumaier at gmail.com> wrote:
Hi all,

I am writing a matrix (typeof = double) into a CSV file with write.csv.

My first column of the matrix is a date in the form yyyy-mm-dd hh:mm:ss:
2016-02-09 07:30:00
[1] "double"


My CSV file contains a sequence of integers (from 1 to x) instead of the
expected date.

How can I prevent that conversion to happen when writing into CSV?

Thanks
Peter


_______________________________________________
R-SIG-Finance at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.