Re: [R] Creating %d/%m/%Y %H:%M:%S format from separate date andtimecolumns

2013-04-18 Thread MacQueen, Don
I know this is a late response, but what about startt - as.POSIXct( paste(data2$V4, data2$V5) ) endt - startt + data2$V6 -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 4/12/13 12:09 AM, Cat Cowie

Re: [R] Creating %d/%m/%Y %H:%M:%S format from separate date andtimecolumns

2013-04-12 Thread Gerrit Eichner
Hello, Cat, see inline below. Hth -- Gerrit On Fri, 12 Apr 2013, Cat Cowie wrote: Hi R forum, Each row of my data (below) show a new contact event between animals. In order to ultimately look at the patterns of intervals between contacts, I need to calculate a contact end time. The

Re: [R] Creating %d/%m/%Y %H:%M:%S format from separate date andtimecolumns

2013-04-12 Thread Cat Cowie
Hi Gerrit, Thanks for your quick reply - this, in combination with reversing the date as it is shown in my data, worked perfectly. startt- strptime((paste(data2$V4, data2$V5)), %Y-%m-%d %H:%M:%S) Apologies for the silly question it seems, but you've saved me a lot of time. Always learning

Re: [R] Creating %d/%m/%Y %H:%M:%S format from separate date andtimecolumns

2013-04-12 Thread Jeff Newmiller
avoid using F, spell it out Use an appropriate TZ... e.g. use Sys.setenv( TZ=Etc/GMT+5 ) before converting if your time is local standard time year round Use difftime to add to time values for consistent results endt - startt + as.difftime( data2$V6, units=secs ) Use the str function to