Re: [R] Extracting last time value

2008-01-11 Thread Gabor Grothendieck
There were errors in the code I posted. Here it is again. See my prior post in this thread for comments. Lines <- "Datetimevalue 2011062011:18:007 2011062011:39:009 2011062111:41:008 2011062111:40:006 20110622

Re: [R] Extracting last time value

2008-01-11 Thread Kondamani, Arjun (GMI - NY Corporate Bonds)
: [R] Extracting last time value Here is a slight variation of ones you have already received. This also uses zoo. In the DF<- line we read it in as a data frame. In the z<- line we convert it to zoo using chron date/times (see R News 4/1 for more). We calculate the positions of duplicate

Re: [R] Extracting last time value

2008-01-10 Thread Gabor Grothendieck
Here is a slight variation of ones you have already received. This also uses zoo. In the DF<- line we read it in as a data frame. In the z<- line we convert it to zoo using chron date/times (see R News 4/1 for more). We calculate the positions of duplicate dates and in the last line we extract t

Re: [R] Extracting last time value

2008-01-10 Thread Achim Zeileis
On Thu, 10 Jan 2008, Kondamani, Arjun (GMI - NY Corporate Bonds) wrote: > I have a dataframe as follows: > > Date timevalue > 20110620 11:18:007 > 20110620 11:39:009 > 20110621 11:41:008 > 20110621 11:40:006 > 20110622 1

Re: [R] Extracting last time value

2008-01-10 Thread jim holtman
This should do it: > x <- read.table(textConnection("Datetimevalue + 2011062011:18:007 + 2011062011:39:009 + 2011062111:41:008 + 2011062111:40:006 + 2011062214:05:008 + 2011062214:06:00

[R] Extracting last time value

2008-01-10 Thread Kondamani, Arjun (GMI - NY Corporate Bonds)
I have a dataframe as follows: Datetimevalue 2011062011:18:007 2011062011:39:009 2011062111:41:008 2011062111:40:006 2011062214:05:008 2011062214:06:006 For every date, I want t