Skip to content
Back to formatted view

Raw Message

Message-ID: <w6yqog8dp1qw5cp20s9ujdhr.1457607004206@email.android.com>
Date: 2016-03-10T10:50:04Z
From: roger bos
Subject: 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:

> a_fetchdata[1,0]

2016-02-09 07:30:00
> typeof(a_fetchdata[1,0])
[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

	[[alternative HTML version deleted]]

_______________________________________________
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.