Displaying 1 result from an estimated 1 matches for "xandn".
Did you mean:
andn
2013 Jun 08
0
modify and append new rows in a dataframe
...# new row
i+2th row: 01-01-2000 00:01:00 act= 30 seconds # previously row i+1th
i+3th row: 01-01-2000 00:01:30 act= 30 seconds # previously row i+2th
.
.
.
I attach a dput with a selection of my data. Here's a piece of code that I am trying to run only for the daytime/night time change:
? xandn <- ddply( xan, .(Ring), function(df1){
? # ?ndex of daytime/night time changes
? ind <- c( FALSE,?diff( as.POSIXlt( df1$timepos, df1$dusk ) ) > 0?)
? add <- df1[ind,]
? add$timepos <- add$timepos - add$dusk
? # append and arrange rows
? df1 <- rbind( df1, add )
? df1 <- df1[ord...