[R] Problem with Dates :-(

2009-04-02 Thread Suresh_FSFM
Dear R users, I know, the question is bit old one. :-( Ok. I have a table with say three columns and 70 rows. The second column has dates in format dd.mm.yy (i.e. 01.10.07 indicating record for October 1, 2007). I read the text file, containing the records. Now, I want to find out the weekday fo

[R] problem with Dates

2009-03-18 Thread venkata kirankumar
Hi all, I am strugling with date formates and caliculating diferent operations like different between 2 dates and getting minimum in vector of dates that is i m working with dates in formate "6/22/1992 12:00:00 AM" and the vector is [1] 6/4/1992 12:00:00 AM 2/13/1992 12:00:00 AM6

Re: [R] Problem with Dates :-(

2009-04-02 Thread Uwe Ligges
Suresh_FSFM wrote: Dear R users, I know, the question is bit old one. :-( Ok. I have a table with say three columns and 70 rows. The second column has dates in format dd.mm.yy (i.e. 01.10.07 indicating record for October 1, 2007). I read the text file, containing the records. Now, I want to f

Re: [R] problem with Dates

2009-03-19 Thread Gabor Grothendieck
Try this (and read R News 4/1): Lines <- "6/4/1992 12:00:00 AM 2/13/1992 12:00:00 AM 6/19/1992 12:00:00 AM 2/11/1992 12:00:00 AM 6/22/1992 12:00:00 AM 10/3/1991 12:00:00 AM 5/12/1992 12:00:00 AM 7/11/1991 12:00:00 AM 2/6/1992 12:00:00 AM 10/4/1991 12:00:00 AM 1/31/1992 12:00:00 AM 6/9/1992 12:00:0

[R] problem with dates in zoo package

2009-02-17 Thread CJ Rubio
i have the following code - assimilating the maximum annual discharge each year ffrom a daily discharge record from year 1989-2005. m <- read.table("D:/documents/5 stations/01014000.csv", sep =",") z <- zoo(m[,4],as.Date(as.character(m[,3]), "%m/%d/%Y")) x <- aggregate(z, floor(as.numeric(as.yea

Re: [R] problem with dates in zoo package

2009-02-17 Thread Gabor Grothendieck
See ?which.max : library(zoo) z <- read.zoo("myfile.dat", sep = ",", format = "%m/%d/%Y") f <- function(x) time(x)[which.max(x)] ix <- tapply(z, floor(as.yearmon(time(z))), f) z[ix] On Tue, Feb 17, 2009 at 3:58 AM, CJ Rubio wrote: > > i have the following code - assimilating the maximum annual