[R] Add 1 week to date with hours included for subset

emorway emorway at engr.colostate.edu
Fri May 14 16:59:18 CEST 2010


For those whose search lands on this post, here is the solution I found that
worked

well.80.2<-data.frame(well.80.2,week=floor(as.numeric(difftime(strptime(well.80.2$date,"%m/%d/%Y
%H:%M",tz=""),strptime(well.80.2$date[1],"%m/%d/%Y
%H:%M",tz=""),tz="",units="hours"))/168))

-- 
View this message in context: http://r.789695.n4.nabble.com/Add-1-week-to-date-with-hours-included-for-subset-tp2216062p2216710.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list