Skip to content
Back to formatted view

Raw Message

Message-ID: <BANLkTiktYC-07Lm8J2AcDfNQWZLfZ+FroQ@mail.gmail.com>
Date: 2011-05-24T21:00:47Z
From: Gabor Grothendieck
Subject: writing dates to a file
In-Reply-To: <85F9FA66366C9E429DD247D19E3480E207F6736FB2@IMCMBX2.MITRE.ORG>

On Tue, May 24, 2011 at 2:34 PM, Heiman, Thomas J. <theiman at mitre.org> wrote:
> Hi,
>
> I have attached the data files to this note. ? I use this code:
>
> library(zoo)
> z1 <- read.zoo("baltimorefludata.txt", format = "%m/%d/%Y", header = TRUE)
> z2 <- read.zoo("baltimorew.txt", format = "%Y%m%d", header = TRUE)
>
> z3<-merge(z1,z2)
>
> write.table(z3, "fluweatherdata_baltimore2.txt", sep="\t")
>
> R is writing the other data to the file but not the dates... ?Is there a way to also write the dates to the file? ?Thank you!!
>

z3 is a zoo object so you want write.zoo, not write.table.  See ?write.zoo.

-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com