Other files ignored by Codecov
DESCRIPTION
has changed.
419 | 419 | output <- moves[grepl(array.string, moves$Array), ] |
|
420 | 420 | ||
421 | 421 | if (nrow(output) > 0) { |
|
422 | - | first.time <<- c(first.time, output$First.time[1]) |
|
422 | + | output$First.time <- as.POSIXct(round.POSIXt(output$First.time, units = timestep)) |
|
423 | + | output$Last.time <- as.POSIXct(round.POSIXt(output$Last.time, units = timestep)) |
|
424 | + | ||
425 | + | # If the period starts in daylight saving time: Standardize so the break points are in "normal" time |
|
426 | + | if (as.POSIXlt(output$First.time[1])$isdst == 1) |
|
427 | + | output$First.time <- output$First.time + 3600 |
|
428 | + | ||
429 | + | if (as.POSIXlt(output$Last.time[1])$isdst == 1) |
|
430 | + | output$Last.time <- output$Last.time + 3600 |
|
431 | + | ||
423 | 432 | last.time <<- c(last.time, output$Last.time[nrow(output)]) |
|
424 | - | output$First.time <- round.POSIXt(output$First.time, units = timestep) |
|
425 | - | output$Last.time <- round.POSIXt(output$Last.time, units = timestep) |
|
433 | + | first.time <<- c(first.time, output$First.time[1]) |
|
426 | 434 | return(output) |
|
427 | 435 | } else { |
|
428 | 436 | return(NULL) |
435 | 443 | attributes(last.time)$tzone <- input$rsp.info$tz |
|
436 | 444 | ||
437 | 445 | if (cumulative) |
|
438 | - | last.time <- round.POSIXt(max(first.time), units = timestep) |
|
446 | + | last.time <- max(first.time) |
|
439 | 447 | else |
|
440 | - | last.time <- round.POSIXt(max(last.time), units = timestep) |
|
448 | + | last.time <- max(last.time) |
|
441 | 449 | ||
442 | - | first.time <- round.POSIXt(min(first.time), units = timestep) |
|
450 | + | first.time <- min(first.time) |
|
443 | 451 | ||
444 | 452 | if (timestep == "days") |
|
445 | 453 | seconds <- 3600 * 24 |
459 | 467 | link <- match(names(plot.list), input$status.df$Transmitter) |
|
460 | 468 | group.names <- input$status.df$Group[link] |
|
461 | 469 | ||
462 | - | plotdata <- lapply(unique(group.names), function (the.group) { |
|
470 | + | plotdata <- lapply(unique(group.names), function(the.group) { |
|
471 | + | # cat("Group: ", as.character(the.group), "\n") |
|
472 | + | ||
463 | 473 | trimmed.list <- plot.list[group.names == the.group] |
|
464 | 474 | aux <- data.frame(x = timerange) |
|
465 | 475 | aux[, as.character(the.group)] <- 0 |
467 | 477 | # counter <- 1 |
|
468 | 478 | capture <- lapply(trimmed.list, function(x) { |
|
469 | 479 | # cat(counter, "\n"); counter <<- counter + 1 |
|
480 | + | ||
470 | 481 | to.add <- rep(0, nrow(aux)) |
|
471 | 482 | if (cumulative) { |
|
472 | 483 | if (ladder.type == "arrival") |
Files | Coverage |
---|---|
R | 90.85% |
Project Totals (15 files) | 90.85% |