Displaying 1 result from an estimated 1 matches for "stop_dt".
Did you mean:
stop_date
2009 Jun 30
1
How to wrap my (working) code in a loop or function? (loop/function newbie alert)
...w dataframe containing all of the extracted rows
from all of the list elements.
I don't need any help with the code itself, it works fine for one chunk of
data (e.g., a single dataframe). The code is:
t0<-match(times$START_DT, data$DATETIME) #MAKE A VECTOR OF START TIMES
t1<-match(times$STOP_DT, data$DATETIME) #MAKE A VECTOR OF STOP TIMES
indices<-mapply(FUN = ":", t0, t1) #MAKES A LIST, EACH ELEMENT CONTAINS
INDICES OF TIMES CORRESPONDING TO ONE WETLAND
idex<-times[rep(1:nrow(times), sapply(indices, length)),
c("POND_ID","OBS","REP","PID...