Re: [R] Date conversions

2009-07-11 Thread Mark Knecht
Thanks. Will do. Cheers, Mark On Sat, Jul 11, 2009 at 12:49 PM, Gabor Grothendieck wrote: > Try: > > format(d, "%a") or format(d, "%A") or as.POSIXlt(d)$wday > > There is also day.of.week in chron. > > On Sat, Jul 11, 2009 at 3:42 PM, Mark Knecht wrote: >> >> On Sat, Jul 11, 2009 at 12:05 PM, Ga

Re: [R] Date conversions

2009-07-11 Thread Gabor Grothendieck
Try: format(d, "%a") or format(d, "%A") or as.POSIXlt(d)$wday There is also day.of.week in chron. On Sat, Jul 11, 2009 at 3:42 PM, Mark Knecht wrote: > On Sat, Jul 11, 2009 at 12:05 PM, Gabor > Grothendieck wrote: > > You want %Y, not %y. > > > > You might also want to look at the zoo package:

Re: [R] Date conversions

2009-07-11 Thread Mark Knecht
On Sat, Jul 11, 2009 at 12:05 PM, Gabor Grothendieck wrote: > You want %Y, not %y. > > You might also want to look at the zoo package: > > library(zoo) > z <- read.zoo("Date1.txt", header = TRUE, sep = ",", format = "%m/%d/%Y") > > or using chron: > > library(zoo) > library(chron) > z <- read.zoo("

Re: [R] Date conversions

2009-07-11 Thread Gabor Grothendieck
You want %Y, not %y. You might also want to look at the zoo package: library(zoo) z <- read.zoo("Date1.txt", header = TRUE, sep = ",", format = "%m/%d/%Y") or using chron: library(zoo) library(chron) z <- read.zoo("Date1.txt", header = TRUE, sep = ",", FUN = as.chron) There are three vignettes

Re: [R] Date conversions

2009-07-11 Thread Mark Knecht
On Sat, Jul 11, 2009 at 10:20 AM, Gabor Grothendieck wrote: > No attachment appeared. I don't think the list allows zip files > as attachments. Try plain text. > > > On Sat, Jul 11, 2009 at 1:10 PM, Mark Knecht wrote: >> Hi all, >>   I'm having a little bit of trouble with some date conversions and

Re: [R] Date conversions

2009-07-11 Thread Gabor Grothendieck
No attachment appeared. I don't think the list allows zip files as attachments. Try plain text. On Sat, Jul 11, 2009 at 1:10 PM, Mark Knecht wrote: > Hi all, >   I'm having a little bit of trouble with some date conversions and > am hoping someone can help me out. Thanks in advance. > >   OK, I h

[R] Date conversions

2009-07-11 Thread Mark Knecht
Hi all, I'm having a little bit of trouble with some date conversions and am hoping someone can help me out. Thanks in advance. OK, I have two sources of data that provide date info in a csv file differently. I've attached a small zipped file with two text files that illustrate both. (Is it