R Under development (unstable) (2023-11-06 r85483 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library("matrixStats") > > diff2_R <- function(..., useNames = NA){ + res <- diff(...) + if (is.na(useNames) || !useNames) names(res) <- NULL + res + } > > set.seed(0x42) > > for (mode in c("integer", "double")) { + x <- rnorm(10, sd = 5) + storage.mode(x) <- mode + str(x) + + for (has_na in c(FALSE, TRUE)) { + for (setNames in c(TRUE, FALSE)) { + for (useNames in c(if (!matrixStats:::isUseNamesNADefunct()) NA, TRUE, FALSE)) { + if (has_na) { + x[sample(1:10, size = 3)] <- NA + } + if (setNames) { + names(x) <- LETTERS[1:10] + } + for (l in 1:3) { + for (d in 1:4) { + cat(sprintf("%s: NAs = %s, lag = %d, differences = %d, setNames = %d, useNames = %d\n", + mode, has_na, l, d, setNames, useNames)) + y0 <- diff2_R(x, lag = l, differences = d, useNames = useNames) + str(y0) + y1 <- diff2(x, lag = l, differences = d, useNames = useNames) + str(y1) + stopifnot(identical(y1, y0)) + } + } + } + } + } # for (has_na ...) + } int [1:10] 11 1 2 0 -1 -3 -3 6 0 0 integer: NAs = FALSE, lag = 1, differences = 1, setNames = 1, useNames = 1 Named int [1:9] -10 1 -2 -1 -2 0 9 -6 0 - attr(*, "names")= chr [1:9] "B" "C" "D" "E" ... Named int [1:9] -10 1 -2 -1 -2 0 9 -6 0 - attr(*, "names")= chr [1:9] "B" "C" "D" "E" ... integer: NAs = FALSE, lag = 1, differences = 2, setNames = 1, useNames = 1 Named int [1:8] 11 -3 1 -1 2 9 -15 6 - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... Named int [1:8] 11 -3 1 -1 2 9 -15 6 - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... integer: NAs = FALSE, lag = 1, differences = 3, setNames = 1, useNames = 1 Named int [1:7] -14 4 -2 3 7 -24 21 - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... Named int [1:7] -14 4 -2 3 7 -24 21 - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... integer: NAs = FALSE, lag = 1, differences = 4, setNames = 1, useNames = 1 Named int [1:6] 18 -6 5 4 -31 45 - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... Named int [1:6] 18 -6 5 4 -31 45 - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... integer: NAs = FALSE, lag = 2, differences = 1, setNames = 1, useNames = 1 Named int [1:8] -9 -1 -3 -3 -2 9 3 -6 - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... Named int [1:8] -9 -1 -3 -3 -2 9 3 -6 - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... integer: NAs = FALSE, lag = 2, differences = 2, setNames = 1, useNames = 1 Named int [1:6] 6 -2 1 12 5 -15 - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... Named int [1:6] 6 -2 1 12 5 -15 - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... integer: NAs = FALSE, lag = 2, differences = 3, setNames = 1, useNames = 1 Named int [1:4] -5 14 4 -27 - attr(*, "names")= chr [1:4] "G" "H" "I" "J" Named int [1:4] -5 14 4 -27 - attr(*, "names")= chr [1:4] "G" "H" "I" "J" integer: NAs = FALSE, lag = 2, differences = 4, setNames = 1, useNames = 1 Named int [1:2] 9 -41 - attr(*, "names")= chr [1:2] "I" "J" Named int [1:2] 9 -41 - attr(*, "names")= chr [1:2] "I" "J" integer: NAs = FALSE, lag = 3, differences = 1, setNames = 1, useNames = 1 Named int [1:7] -11 -2 -5 -3 7 3 3 - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... Named int [1:7] -11 -2 -5 -3 7 3 3 - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... integer: NAs = FALSE, lag = 3, differences = 2, setNames = 1, useNames = 1 Named int [1:4] 8 9 8 6 - attr(*, "names")= chr [1:4] "G" "H" "I" "J" Named int [1:4] 8 9 8 6 - attr(*, "names")= chr [1:4] "G" "H" "I" "J" integer: NAs = FALSE, lag = 3, differences = 3, setNames = 1, useNames = 1 Named int -2 - attr(*, "names")= chr "J" Named int -2 - attr(*, "names")= chr "J" integer: NAs = FALSE, lag = 3, differences = 4, setNames = 1, useNames = 1 Named int(0) - attr(*, "names")= chr(0) Named int(0) - attr(*, "names")= chr(0) integer: NAs = FALSE, lag = 1, differences = 1, setNames = 1, useNames = 0 int [1:9] -10 1 -2 -1 -2 0 9 -6 0 int [1:9] -10 1 -2 -1 -2 0 9 -6 0 integer: NAs = FALSE, lag = 1, differences = 2, setNames = 1, useNames = 0 int [1:8] 11 -3 1 -1 2 9 -15 6 int [1:8] 11 -3 1 -1 2 9 -15 6 integer: NAs = FALSE, lag = 1, differences = 3, setNames = 1, useNames = 0 int [1:7] -14 4 -2 3 7 -24 21 int [1:7] -14 4 -2 3 7 -24 21 integer: NAs = FALSE, lag = 1, differences = 4, setNames = 1, useNames = 0 int [1:6] 18 -6 5 4 -31 45 int [1:6] 18 -6 5 4 -31 45 integer: NAs = FALSE, lag = 2, differences = 1, setNames = 1, useNames = 0 int [1:8] -9 -1 -3 -3 -2 9 3 -6 int [1:8] -9 -1 -3 -3 -2 9 3 -6 integer: NAs = FALSE, lag = 2, differences = 2, setNames = 1, useNames = 0 int [1:6] 6 -2 1 12 5 -15 int [1:6] 6 -2 1 12 5 -15 integer: NAs = FALSE, lag = 2, differences = 3, setNames = 1, useNames = 0 int [1:4] -5 14 4 -27 int [1:4] -5 14 4 -27 integer: NAs = FALSE, lag = 2, differences = 4, setNames = 1, useNames = 0 int [1:2] 9 -41 int [1:2] 9 -41 integer: NAs = FALSE, lag = 3, differences = 1, setNames = 1, useNames = 0 int [1:7] -11 -2 -5 -3 7 3 3 int [1:7] -11 -2 -5 -3 7 3 3 integer: NAs = FALSE, lag = 3, differences = 2, setNames = 1, useNames = 0 int [1:4] 8 9 8 6 int [1:4] 8 9 8 6 integer: NAs = FALSE, lag = 3, differences = 3, setNames = 1, useNames = 0 int -2 int -2 integer: NAs = FALSE, lag = 3, differences = 4, setNames = 1, useNames = 0 int(0) int(0) integer: NAs = FALSE, lag = 1, differences = 1, setNames = 0, useNames = 1 Named int [1:9] -10 1 -2 -1 -2 0 9 -6 0 - attr(*, "names")= chr [1:9] "B" "C" "D" "E" ... Named int [1:9] -10 1 -2 -1 -2 0 9 -6 0 - attr(*, "names")= chr [1:9] "B" "C" "D" "E" ... integer: NAs = FALSE, lag = 1, differences = 2, setNames = 0, useNames = 1 Named int [1:8] 11 -3 1 -1 2 9 -15 6 - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... Named int [1:8] 11 -3 1 -1 2 9 -15 6 - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... integer: NAs = FALSE, lag = 1, differences = 3, setNames = 0, useNames = 1 Named int [1:7] -14 4 -2 3 7 -24 21 - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... Named int [1:7] -14 4 -2 3 7 -24 21 - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... integer: NAs = FALSE, lag = 1, differences = 4, setNames = 0, useNames = 1 Named int [1:6] 18 -6 5 4 -31 45 - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... Named int [1:6] 18 -6 5 4 -31 45 - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... integer: NAs = FALSE, lag = 2, differences = 1, setNames = 0, useNames = 1 Named int [1:8] -9 -1 -3 -3 -2 9 3 -6 - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... Named int [1:8] -9 -1 -3 -3 -2 9 3 -6 - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... integer: NAs = FALSE, lag = 2, differences = 2, setNames = 0, useNames = 1 Named int [1:6] 6 -2 1 12 5 -15 - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... Named int [1:6] 6 -2 1 12 5 -15 - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... integer: NAs = FALSE, lag = 2, differences = 3, setNames = 0, useNames = 1 Named int [1:4] -5 14 4 -27 - attr(*, "names")= chr [1:4] "G" "H" "I" "J" Named int [1:4] -5 14 4 -27 - attr(*, "names")= chr [1:4] "G" "H" "I" "J" integer: NAs = FALSE, lag = 2, differences = 4, setNames = 0, useNames = 1 Named int [1:2] 9 -41 - attr(*, "names")= chr [1:2] "I" "J" Named int [1:2] 9 -41 - attr(*, "names")= chr [1:2] "I" "J" integer: NAs = FALSE, lag = 3, differences = 1, setNames = 0, useNames = 1 Named int [1:7] -11 -2 -5 -3 7 3 3 - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... Named int [1:7] -11 -2 -5 -3 7 3 3 - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... integer: NAs = FALSE, lag = 3, differences = 2, setNames = 0, useNames = 1 Named int [1:4] 8 9 8 6 - attr(*, "names")= chr [1:4] "G" "H" "I" "J" Named int [1:4] 8 9 8 6 - attr(*, "names")= chr [1:4] "G" "H" "I" "J" integer: NAs = FALSE, lag = 3, differences = 3, setNames = 0, useNames = 1 Named int -2 - attr(*, "names")= chr "J" Named int -2 - attr(*, "names")= chr "J" integer: NAs = FALSE, lag = 3, differences = 4, setNames = 0, useNames = 1 Named int(0) - attr(*, "names")= chr(0) Named int(0) - attr(*, "names")= chr(0) integer: NAs = FALSE, lag = 1, differences = 1, setNames = 0, useNames = 0 int [1:9] -10 1 -2 -1 -2 0 9 -6 0 int [1:9] -10 1 -2 -1 -2 0 9 -6 0 integer: NAs = FALSE, lag = 1, differences = 2, setNames = 0, useNames = 0 int [1:8] 11 -3 1 -1 2 9 -15 6 int [1:8] 11 -3 1 -1 2 9 -15 6 integer: NAs = FALSE, lag = 1, differences = 3, setNames = 0, useNames = 0 int [1:7] -14 4 -2 3 7 -24 21 int [1:7] -14 4 -2 3 7 -24 21 integer: NAs = FALSE, lag = 1, differences = 4, setNames = 0, useNames = 0 int [1:6] 18 -6 5 4 -31 45 int [1:6] 18 -6 5 4 -31 45 integer: NAs = FALSE, lag = 2, differences = 1, setNames = 0, useNames = 0 int [1:8] -9 -1 -3 -3 -2 9 3 -6 int [1:8] -9 -1 -3 -3 -2 9 3 -6 integer: NAs = FALSE, lag = 2, differences = 2, setNames = 0, useNames = 0 int [1:6] 6 -2 1 12 5 -15 int [1:6] 6 -2 1 12 5 -15 integer: NAs = FALSE, lag = 2, differences = 3, setNames = 0, useNames = 0 int [1:4] -5 14 4 -27 int [1:4] -5 14 4 -27 integer: NAs = FALSE, lag = 2, differences = 4, setNames = 0, useNames = 0 int [1:2] 9 -41 int [1:2] 9 -41 integer: NAs = FALSE, lag = 3, differences = 1, setNames = 0, useNames = 0 int [1:7] -11 -2 -5 -3 7 3 3 int [1:7] -11 -2 -5 -3 7 3 3 integer: NAs = FALSE, lag = 3, differences = 2, setNames = 0, useNames = 0 int [1:4] 8 9 8 6 int [1:4] 8 9 8 6 integer: NAs = FALSE, lag = 3, differences = 3, setNames = 0, useNames = 0 int -2 int -2 integer: NAs = FALSE, lag = 3, differences = 4, setNames = 0, useNames = 0 int(0) int(0) integer: NAs = TRUE, lag = 1, differences = 1, setNames = 1, useNames = 1 Named int [1:9] NA NA NA NA NA 0 9 -6 0 - attr(*, "names")= chr [1:9] "B" "C" "D" "E" ... Named int [1:9] NA NA NA NA NA 0 9 -6 0 - attr(*, "names")= chr [1:9] "B" "C" "D" "E" ... integer: NAs = TRUE, lag = 1, differences = 2, setNames = 1, useNames = 1 Named int [1:8] NA NA NA NA NA 9 -15 6 - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... Named int [1:8] NA NA NA NA NA 9 -15 6 - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... integer: NAs = TRUE, lag = 1, differences = 3, setNames = 1, useNames = 1 Named int [1:7] NA NA NA NA NA -24 21 - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... Named int [1:7] NA NA NA NA NA -24 21 - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... integer: NAs = TRUE, lag = 1, differences = 4, setNames = 1, useNames = 1 Named int [1:6] NA NA NA NA NA 45 - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... Named int [1:6] NA NA NA NA NA 45 - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... integer: NAs = TRUE, lag = 2, differences = 1, setNames = 1, useNames = 1 Named int [1:8] -9 NA NA NA NA 9 3 -6 - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... Named int [1:8] -9 NA NA NA NA 9 3 -6 - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... integer: NAs = TRUE, lag = 2, differences = 2, setNames = 1, useNames = 1 Named int [1:6] NA NA NA NA NA -15 - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... Named int [1:6] NA NA NA NA NA -15 - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... integer: NAs = TRUE, lag = 2, differences = 3, setNames = 1, useNames = 1 Named int [1:4] NA NA NA NA - attr(*, "names")= chr [1:4] "G" "H" "I" "J" Named int [1:4] NA NA NA NA - attr(*, "names")= chr [1:4] "G" "H" "I" "J" integer: NAs = TRUE, lag = 2, differences = 4, setNames = 1, useNames = 1 Named int [1:2] NA NA - attr(*, "names")= chr [1:2] "I" "J" Named int [1:2] NA NA - attr(*, "names")= chr [1:2] "I" "J" integer: NAs = TRUE, lag = 3, differences = 1, setNames = 1, useNames = 1 Named int [1:7] NA NA -5 NA NA 3 3 - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... Named int [1:7] NA NA -5 NA NA 3 3 - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... integer: NAs = TRUE, lag = 3, differences = 2, setNames = 1, useNames = 1 Named int [1:4] NA NA 8 NA - attr(*, "names")= chr [1:4] "G" "H" "I" "J" Named int [1:4] NA NA 8 NA - attr(*, "names")= chr [1:4] "G" "H" "I" "J" integer: NAs = TRUE, lag = 3, differences = 3, setNames = 1, useNames = 1 Named int NA - attr(*, "names")= chr "J" Named int NA - attr(*, "names")= chr "J" integer: NAs = TRUE, lag = 3, differences = 4, setNames = 1, useNames = 1 Named int(0) - attr(*, "names")= chr(0) Named int(0) - attr(*, "names")= chr(0) integer: NAs = TRUE, lag = 1, differences = 1, setNames = 1, useNames = 0 int [1:9] NA NA NA NA NA 0 9 NA NA int [1:9] NA NA NA NA NA 0 9 NA NA integer: NAs = TRUE, lag = 1, differences = 2, setNames = 1, useNames = 0 int [1:8] NA NA NA NA NA 9 NA NA int [1:8] NA NA NA NA NA 9 NA NA integer: NAs = TRUE, lag = 1, differences = 3, setNames = 1, useNames = 0 int [1:7] NA NA NA NA NA NA NA int [1:7] NA NA NA NA NA NA NA integer: NAs = TRUE, lag = 1, differences = 4, setNames = 1, useNames = 0 int [1:6] NA NA NA NA NA NA int [1:6] NA NA NA NA NA NA integer: NAs = TRUE, lag = 2, differences = 1, setNames = 1, useNames = 0 int [1:8] NA NA NA NA NA 9 NA -6 int [1:8] NA NA NA NA NA 9 NA -6 integer: NAs = TRUE, lag = 2, differences = 2, setNames = 1, useNames = 0 int [1:6] NA NA NA NA NA -15 int [1:6] NA NA NA NA NA -15 integer: NAs = TRUE, lag = 2, differences = 3, setNames = 1, useNames = 0 int [1:4] NA NA NA NA int [1:4] NA NA NA NA integer: NAs = TRUE, lag = 2, differences = 4, setNames = 1, useNames = 0 int [1:2] NA NA int [1:2] NA NA integer: NAs = TRUE, lag = 3, differences = 1, setNames = 1, useNames = 0 int [1:7] NA NA NA NA NA NA 3 int [1:7] NA NA NA NA NA NA 3 integer: NAs = TRUE, lag = 3, differences = 2, setNames = 1, useNames = 0 int [1:4] NA NA NA NA int [1:4] NA NA NA NA integer: NAs = TRUE, lag = 3, differences = 3, setNames = 1, useNames = 0 int NA int NA integer: NAs = TRUE, lag = 3, differences = 4, setNames = 1, useNames = 0 int(0) int(0) integer: NAs = TRUE, lag = 1, differences = 1, setNames = 0, useNames = 1 Named int [1:9] NA NA NA NA NA NA NA NA NA - attr(*, "names")= chr [1:9] "B" "C" "D" "E" ... Named int [1:9] NA NA NA NA NA NA NA NA NA - attr(*, "names")= chr [1:9] "B" "C" "D" "E" ... integer: NAs = TRUE, lag = 1, differences = 2, setNames = 0, useNames = 1 Named int [1:8] NA NA NA NA NA NA NA NA - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... Named int [1:8] NA NA NA NA NA NA NA NA - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... integer: NAs = TRUE, lag = 1, differences = 3, setNames = 0, useNames = 1 Named int [1:7] NA NA NA NA NA NA NA - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... Named int [1:7] NA NA NA NA NA NA NA - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... integer: NAs = TRUE, lag = 1, differences = 4, setNames = 0, useNames = 1 Named int [1:6] NA NA NA NA NA NA - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... Named int [1:6] NA NA NA NA NA NA - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... integer: NAs = TRUE, lag = 2, differences = 1, setNames = 0, useNames = 1 Named int [1:8] NA NA NA NA NA NA NA NA - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... Named int [1:8] NA NA NA NA NA NA NA NA - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... integer: NAs = TRUE, lag = 2, differences = 2, setNames = 0, useNames = 1 Named int [1:6] NA NA NA NA NA NA - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... Named int [1:6] NA NA NA NA NA NA - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... integer: NAs = TRUE, lag = 2, differences = 3, setNames = 0, useNames = 1 Named int [1:4] NA NA NA NA - attr(*, "names")= chr [1:4] "G" "H" "I" "J" Named int [1:4] NA NA NA NA - attr(*, "names")= chr [1:4] "G" "H" "I" "J" integer: NAs = TRUE, lag = 2, differences = 4, setNames = 0, useNames = 1 Named int [1:2] NA NA - attr(*, "names")= chr [1:2] "I" "J" Named int [1:2] NA NA - attr(*, "names")= chr [1:2] "I" "J" integer: NAs = TRUE, lag = 3, differences = 1, setNames = 0, useNames = 1 Named int [1:7] NA NA NA NA NA NA 3 - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... Named int [1:7] NA NA NA NA NA NA 3 - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... integer: NAs = TRUE, lag = 3, differences = 2, setNames = 0, useNames = 1 Named int [1:4] NA NA NA NA - attr(*, "names")= chr [1:4] "G" "H" "I" "J" Named int [1:4] NA NA NA NA - attr(*, "names")= chr [1:4] "G" "H" "I" "J" integer: NAs = TRUE, lag = 3, differences = 3, setNames = 0, useNames = 1 Named int NA - attr(*, "names")= chr "J" Named int NA - attr(*, "names")= chr "J" integer: NAs = TRUE, lag = 3, differences = 4, setNames = 0, useNames = 1 Named int(0) - attr(*, "names")= chr(0) Named int(0) - attr(*, "names")= chr(0) integer: NAs = TRUE, lag = 1, differences = 1, setNames = 0, useNames = 0 int [1:9] NA NA NA NA NA NA NA NA NA int [1:9] NA NA NA NA NA NA NA NA NA integer: NAs = TRUE, lag = 1, differences = 2, setNames = 0, useNames = 0 int [1:8] NA NA NA NA NA NA NA NA int [1:8] NA NA NA NA NA NA NA NA integer: NAs = TRUE, lag = 1, differences = 3, setNames = 0, useNames = 0 int [1:7] NA NA NA NA NA NA NA int [1:7] NA NA NA NA NA NA NA integer: NAs = TRUE, lag = 1, differences = 4, setNames = 0, useNames = 0 int [1:6] NA NA NA NA NA NA int [1:6] NA NA NA NA NA NA integer: NAs = TRUE, lag = 2, differences = 1, setNames = 0, useNames = 0 int [1:8] NA NA NA NA NA NA NA NA int [1:8] NA NA NA NA NA NA NA NA integer: NAs = TRUE, lag = 2, differences = 2, setNames = 0, useNames = 0 int [1:6] NA NA NA NA NA NA int [1:6] NA NA NA NA NA NA integer: NAs = TRUE, lag = 2, differences = 3, setNames = 0, useNames = 0 int [1:4] NA NA NA NA int [1:4] NA NA NA NA integer: NAs = TRUE, lag = 2, differences = 4, setNames = 0, useNames = 0 int [1:2] NA NA int [1:2] NA NA integer: NAs = TRUE, lag = 3, differences = 1, setNames = 0, useNames = 0 int [1:7] NA NA NA NA NA NA 3 int [1:7] NA NA NA NA NA NA 3 integer: NAs = TRUE, lag = 3, differences = 2, setNames = 0, useNames = 0 int [1:4] NA NA NA NA int [1:4] NA NA NA NA integer: NAs = TRUE, lag = 3, differences = 3, setNames = 0, useNames = 0 int NA int NA integer: NAs = TRUE, lag = 3, differences = 4, setNames = 0, useNames = 0 int(0) int(0) num [1:10] 2.586 -0.344 0.33 9.155 -3.254 ... double: NAs = FALSE, lag = 1, differences = 1, setNames = 1, useNames = 1 Named num [1:9] -2.929 0.673 8.826 -12.409 -1.221 ... - attr(*, "names")= chr [1:9] "B" "C" "D" "E" ... Named num [1:9] -2.929 0.673 8.826 -12.409 -1.221 ... - attr(*, "names")= chr [1:9] "B" "C" "D" "E" ... double: NAs = FALSE, lag = 1, differences = 2, setNames = 1, useNames = 1 Named num [1:8] 3.6 8.15 -21.23 11.19 -2.1 ... - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... Named num [1:8] 3.6 8.15 -21.23 11.19 -2.1 ... - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... double: NAs = FALSE, lag = 1, differences = 3, setNames = 1, useNames = 1 Named num [1:7] 4.55 -29.39 32.42 -13.29 14.97 ... - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... Named num [1:7] 4.55 -29.39 32.42 -13.29 14.97 ... - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... double: NAs = FALSE, lag = 1, differences = 4, setNames = 1, useNames = 1 Named num [1:6] -33.9 61.8 -45.7 28.3 -37 ... - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... Named num [1:6] -33.9 61.8 -45.7 28.3 -37 ... - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... double: NAs = FALSE, lag = 2, differences = 1, setNames = 1, useNames = 1 Named num [1:8] -2.26 9.5 -3.58 -13.63 -4.54 ... - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... Named num [1:8] -2.26 9.5 -3.58 -13.63 -4.54 ... - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... double: NAs = FALSE, lag = 2, differences = 2, setNames = 1, useNames = 1 Named num [1:6] -1.33 -23.13 -0.96 19.86 14.44 ... - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... Named num [1:6] -1.33 -23.13 -0.96 19.86 14.44 ... - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... double: NAs = FALSE, lag = 2, differences = 3, setNames = 1, useNames = 1 Named num [1:4] 0.368 42.988 15.396 -29.313 - attr(*, "names")= chr [1:4] "G" "H" "I" "J" Named num [1:4] 0.368 42.988 15.396 -29.313 - attr(*, "names")= chr [1:4] "G" "H" "I" "J" double: NAs = FALSE, lag = 2, differences = 4, setNames = 1, useNames = 1 Named num [1:2] 15 -72.3 - attr(*, "names")= chr [1:2] "I" "J" Named num [1:2] 15 -72.3 - attr(*, "names")= chr [1:2] "I" "J" double: NAs = FALSE, lag = 3, differences = 1, setNames = 1, useNames = 1 Named num [1:7] 6.57 -2.91 -4.81 -16.95 5.01 ... - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... Named num [1:7] 6.57 -2.91 -4.81 -16.95 5.01 ... - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... double: NAs = FALSE, lag = 3, differences = 2, setNames = 1, useNames = 1 Named num [1:4] -23.52 7.92 11.38 23.27 - attr(*, "names")= chr [1:4] "G" "H" "I" "J" Named num [1:4] -23.52 7.92 11.38 23.27 - attr(*, "names")= chr [1:4] "G" "H" "I" "J" double: NAs = FALSE, lag = 3, differences = 3, setNames = 1, useNames = 1 Named num 46.8 - attr(*, "names")= chr "J" Named num 46.8 - attr(*, "names")= chr "J" double: NAs = FALSE, lag = 3, differences = 4, setNames = 1, useNames = 1 Named num(0) - attr(*, "names")= chr(0) Named num(0) - attr(*, "names")= chr(0) double: NAs = FALSE, lag = 1, differences = 1, setNames = 1, useNames = 0 num [1:9] -2.929 0.673 8.826 -12.409 -1.221 ... num [1:9] -2.929 0.673 8.826 -12.409 -1.221 ... double: NAs = FALSE, lag = 1, differences = 2, setNames = 1, useNames = 0 num [1:8] 3.6 8.15 -21.23 11.19 -2.1 ... num [1:8] 3.6 8.15 -21.23 11.19 -2.1 ... double: NAs = FALSE, lag = 1, differences = 3, setNames = 1, useNames = 0 num [1:7] 4.55 -29.39 32.42 -13.29 14.97 ... num [1:7] 4.55 -29.39 32.42 -13.29 14.97 ... double: NAs = FALSE, lag = 1, differences = 4, setNames = 1, useNames = 0 num [1:6] -33.9 61.8 -45.7 28.3 -37 ... num [1:6] -33.9 61.8 -45.7 28.3 -37 ... double: NAs = FALSE, lag = 2, differences = 1, setNames = 1, useNames = 0 num [1:8] -2.26 9.5 -3.58 -13.63 -4.54 ... num [1:8] -2.26 9.5 -3.58 -13.63 -4.54 ... double: NAs = FALSE, lag = 2, differences = 2, setNames = 1, useNames = 0 num [1:6] -1.33 -23.13 -0.96 19.86 14.44 ... num [1:6] -1.33 -23.13 -0.96 19.86 14.44 ... double: NAs = FALSE, lag = 2, differences = 3, setNames = 1, useNames = 0 num [1:4] 0.368 42.988 15.396 -29.313 num [1:4] 0.368 42.988 15.396 -29.313 double: NAs = FALSE, lag = 2, differences = 4, setNames = 1, useNames = 0 num [1:2] 15 -72.3 num [1:2] 15 -72.3 double: NAs = FALSE, lag = 3, differences = 1, setNames = 1, useNames = 0 num [1:7] 6.57 -2.91 -4.81 -16.95 5.01 ... num [1:7] 6.57 -2.91 -4.81 -16.95 5.01 ... double: NAs = FALSE, lag = 3, differences = 2, setNames = 1, useNames = 0 num [1:4] -23.52 7.92 11.38 23.27 num [1:4] -23.52 7.92 11.38 23.27 double: NAs = FALSE, lag = 3, differences = 3, setNames = 1, useNames = 0 num 46.8 num 46.8 double: NAs = FALSE, lag = 3, differences = 4, setNames = 1, useNames = 0 num(0) num(0) double: NAs = FALSE, lag = 1, differences = 1, setNames = 0, useNames = 1 Named num [1:9] -2.929 0.673 8.826 -12.409 -1.221 ... - attr(*, "names")= chr [1:9] "B" "C" "D" "E" ... Named num [1:9] -2.929 0.673 8.826 -12.409 -1.221 ... - attr(*, "names")= chr [1:9] "B" "C" "D" "E" ... double: NAs = FALSE, lag = 1, differences = 2, setNames = 0, useNames = 1 Named num [1:8] 3.6 8.15 -21.23 11.19 -2.1 ... - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... Named num [1:8] 3.6 8.15 -21.23 11.19 -2.1 ... - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... double: NAs = FALSE, lag = 1, differences = 3, setNames = 0, useNames = 1 Named num [1:7] 4.55 -29.39 32.42 -13.29 14.97 ... - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... Named num [1:7] 4.55 -29.39 32.42 -13.29 14.97 ... - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... double: NAs = FALSE, lag = 1, differences = 4, setNames = 0, useNames = 1 Named num [1:6] -33.9 61.8 -45.7 28.3 -37 ... - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... Named num [1:6] -33.9 61.8 -45.7 28.3 -37 ... - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... double: NAs = FALSE, lag = 2, differences = 1, setNames = 0, useNames = 1 Named num [1:8] -2.26 9.5 -3.58 -13.63 -4.54 ... - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... Named num [1:8] -2.26 9.5 -3.58 -13.63 -4.54 ... - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... double: NAs = FALSE, lag = 2, differences = 2, setNames = 0, useNames = 1 Named num [1:6] -1.33 -23.13 -0.96 19.86 14.44 ... - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... Named num [1:6] -1.33 -23.13 -0.96 19.86 14.44 ... - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... double: NAs = FALSE, lag = 2, differences = 3, setNames = 0, useNames = 1 Named num [1:4] 0.368 42.988 15.396 -29.313 - attr(*, "names")= chr [1:4] "G" "H" "I" "J" Named num [1:4] 0.368 42.988 15.396 -29.313 - attr(*, "names")= chr [1:4] "G" "H" "I" "J" double: NAs = FALSE, lag = 2, differences = 4, setNames = 0, useNames = 1 Named num [1:2] 15 -72.3 - attr(*, "names")= chr [1:2] "I" "J" Named num [1:2] 15 -72.3 - attr(*, "names")= chr [1:2] "I" "J" double: NAs = FALSE, lag = 3, differences = 1, setNames = 0, useNames = 1 Named num [1:7] 6.57 -2.91 -4.81 -16.95 5.01 ... - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... Named num [1:7] 6.57 -2.91 -4.81 -16.95 5.01 ... - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... double: NAs = FALSE, lag = 3, differences = 2, setNames = 0, useNames = 1 Named num [1:4] -23.52 7.92 11.38 23.27 - attr(*, "names")= chr [1:4] "G" "H" "I" "J" Named num [1:4] -23.52 7.92 11.38 23.27 - attr(*, "names")= chr [1:4] "G" "H" "I" "J" double: NAs = FALSE, lag = 3, differences = 3, setNames = 0, useNames = 1 Named num 46.8 - attr(*, "names")= chr "J" Named num 46.8 - attr(*, "names")= chr "J" double: NAs = FALSE, lag = 3, differences = 4, setNames = 0, useNames = 1 Named num(0) - attr(*, "names")= chr(0) Named num(0) - attr(*, "names")= chr(0) double: NAs = FALSE, lag = 1, differences = 1, setNames = 0, useNames = 0 num [1:9] -2.929 0.673 8.826 -12.409 -1.221 ... num [1:9] -2.929 0.673 8.826 -12.409 -1.221 ... double: NAs = FALSE, lag = 1, differences = 2, setNames = 0, useNames = 0 num [1:8] 3.6 8.15 -21.23 11.19 -2.1 ... num [1:8] 3.6 8.15 -21.23 11.19 -2.1 ... double: NAs = FALSE, lag = 1, differences = 3, setNames = 0, useNames = 0 num [1:7] 4.55 -29.39 32.42 -13.29 14.97 ... num [1:7] 4.55 -29.39 32.42 -13.29 14.97 ... double: NAs = FALSE, lag = 1, differences = 4, setNames = 0, useNames = 0 num [1:6] -33.9 61.8 -45.7 28.3 -37 ... num [1:6] -33.9 61.8 -45.7 28.3 -37 ... double: NAs = FALSE, lag = 2, differences = 1, setNames = 0, useNames = 0 num [1:8] -2.26 9.5 -3.58 -13.63 -4.54 ... num [1:8] -2.26 9.5 -3.58 -13.63 -4.54 ... double: NAs = FALSE, lag = 2, differences = 2, setNames = 0, useNames = 0 num [1:6] -1.33 -23.13 -0.96 19.86 14.44 ... num [1:6] -1.33 -23.13 -0.96 19.86 14.44 ... double: NAs = FALSE, lag = 2, differences = 3, setNames = 0, useNames = 0 num [1:4] 0.368 42.988 15.396 -29.313 num [1:4] 0.368 42.988 15.396 -29.313 double: NAs = FALSE, lag = 2, differences = 4, setNames = 0, useNames = 0 num [1:2] 15 -72.3 num [1:2] 15 -72.3 double: NAs = FALSE, lag = 3, differences = 1, setNames = 0, useNames = 0 num [1:7] 6.57 -2.91 -4.81 -16.95 5.01 ... num [1:7] 6.57 -2.91 -4.81 -16.95 5.01 ... double: NAs = FALSE, lag = 3, differences = 2, setNames = 0, useNames = 0 num [1:4] -23.52 7.92 11.38 23.27 num [1:4] -23.52 7.92 11.38 23.27 double: NAs = FALSE, lag = 3, differences = 3, setNames = 0, useNames = 0 num 46.8 num 46.8 double: NAs = FALSE, lag = 3, differences = 4, setNames = 0, useNames = 0 num(0) num(0) double: NAs = TRUE, lag = 1, differences = 1, setNames = 1, useNames = 1 Named num [1:9] -2.929 0.673 8.826 NA NA ... - attr(*, "names")= chr [1:9] "B" "C" "D" "E" ... Named num [1:9] -2.929 0.673 8.826 NA NA ... - attr(*, "names")= chr [1:9] "B" "C" "D" "E" ... double: NAs = TRUE, lag = 1, differences = 2, setNames = 1, useNames = 1 Named num [1:8] 3.6 8.15 NA NA NA ... - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... Named num [1:8] 3.6 8.15 NA NA NA ... - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... double: NAs = TRUE, lag = 1, differences = 3, setNames = 1, useNames = 1 Named num [1:7] 4.55 NA NA NA NA ... - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... Named num [1:7] 4.55 NA NA NA NA ... - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... double: NAs = TRUE, lag = 1, differences = 4, setNames = 1, useNames = 1 Named num [1:6] NA NA NA NA NA NA - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... Named num [1:6] NA NA NA NA NA NA - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... double: NAs = TRUE, lag = 2, differences = 1, setNames = 1, useNames = 1 Named num [1:8] -2.26 9.5 NA NA NA ... - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... Named num [1:8] -2.26 9.5 NA NA NA ... - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... double: NAs = TRUE, lag = 2, differences = 2, setNames = 1, useNames = 1 Named num [1:6] NA NA NA NA NA NA - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... Named num [1:6] NA NA NA NA NA NA - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... double: NAs = TRUE, lag = 2, differences = 3, setNames = 1, useNames = 1 Named num [1:4] NA NA NA NA - attr(*, "names")= chr [1:4] "G" "H" "I" "J" Named num [1:4] NA NA NA NA - attr(*, "names")= chr [1:4] "G" "H" "I" "J" double: NAs = TRUE, lag = 2, differences = 4, setNames = 1, useNames = 1 Named num [1:2] NA NA - attr(*, "names")= chr [1:2] "I" "J" Named num [1:2] NA NA - attr(*, "names")= chr [1:2] "I" "J" double: NAs = TRUE, lag = 3, differences = 1, setNames = 1, useNames = 1 Named num [1:7] 6.57 NA NA -16.95 NA ... - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... Named num [1:7] 6.57 NA NA -16.95 NA ... - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... double: NAs = TRUE, lag = 3, differences = 2, setNames = 1, useNames = 1 Named num [1:4] -23.5 NA NA 23.3 - attr(*, "names")= chr [1:4] "G" "H" "I" "J" Named num [1:4] -23.5 NA NA 23.3 - attr(*, "names")= chr [1:4] "G" "H" "I" "J" double: NAs = TRUE, lag = 3, differences = 3, setNames = 1, useNames = 1 Named num 46.8 - attr(*, "names")= chr "J" Named num 46.8 - attr(*, "names")= chr "J" double: NAs = TRUE, lag = 3, differences = 4, setNames = 1, useNames = 1 Named num(0) - attr(*, "names")= chr(0) Named num(0) - attr(*, "names")= chr(0) double: NAs = TRUE, lag = 1, differences = 1, setNames = 1, useNames = 0 num [1:9] NA 0.673 8.826 NA NA ... num [1:9] NA 0.673 8.826 NA NA ... double: NAs = TRUE, lag = 1, differences = 2, setNames = 1, useNames = 0 num [1:8] NA 8.15 NA NA NA ... num [1:8] NA 8.15 NA NA NA ... double: NAs = TRUE, lag = 1, differences = 3, setNames = 1, useNames = 0 num [1:7] NA NA NA NA NA NA NA num [1:7] NA NA NA NA NA NA NA double: NAs = TRUE, lag = 1, differences = 4, setNames = 1, useNames = 0 num [1:6] NA NA NA NA NA NA num [1:6] NA NA NA NA NA NA double: NAs = TRUE, lag = 2, differences = 1, setNames = 1, useNames = 0 num [1:8] NA 9.5 NA NA NA ... num [1:8] NA 9.5 NA NA NA ... double: NAs = TRUE, lag = 2, differences = 2, setNames = 1, useNames = 0 num [1:6] NA NA NA NA NA NA num [1:6] NA NA NA NA NA NA double: NAs = TRUE, lag = 2, differences = 3, setNames = 1, useNames = 0 num [1:4] NA NA NA NA num [1:4] NA NA NA NA double: NAs = TRUE, lag = 2, differences = 4, setNames = 1, useNames = 0 num [1:2] NA NA num [1:2] NA NA double: NAs = TRUE, lag = 3, differences = 1, setNames = 1, useNames = 0 num [1:7] NA NA NA NA NA NA NA num [1:7] NA NA NA NA NA NA NA double: NAs = TRUE, lag = 3, differences = 2, setNames = 1, useNames = 0 num [1:4] NA NA NA NA num [1:4] NA NA NA NA double: NAs = TRUE, lag = 3, differences = 3, setNames = 1, useNames = 0 num NA num NA double: NAs = TRUE, lag = 3, differences = 4, setNames = 1, useNames = 0 num(0) num(0) double: NAs = TRUE, lag = 1, differences = 1, setNames = 0, useNames = 1 Named num [1:9] NA 0.673 8.826 NA NA ... - attr(*, "names")= chr [1:9] "B" "C" "D" "E" ... Named num [1:9] NA 0.673 8.826 NA NA ... - attr(*, "names")= chr [1:9] "B" "C" "D" "E" ... double: NAs = TRUE, lag = 1, differences = 2, setNames = 0, useNames = 1 Named num [1:8] NA 8.15 NA NA NA ... - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... Named num [1:8] NA 8.15 NA NA NA ... - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... double: NAs = TRUE, lag = 1, differences = 3, setNames = 0, useNames = 1 Named num [1:7] NA NA NA NA NA NA NA - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... Named num [1:7] NA NA NA NA NA NA NA - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... double: NAs = TRUE, lag = 1, differences = 4, setNames = 0, useNames = 1 Named num [1:6] NA NA NA NA NA NA - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... Named num [1:6] NA NA NA NA NA NA - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... double: NAs = TRUE, lag = 2, differences = 1, setNames = 0, useNames = 1 Named num [1:8] NA 9.5 NA NA NA ... - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... Named num [1:8] NA 9.5 NA NA NA ... - attr(*, "names")= chr [1:8] "C" "D" "E" "F" ... double: NAs = TRUE, lag = 2, differences = 2, setNames = 0, useNames = 1 Named num [1:6] NA NA NA NA NA NA - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... Named num [1:6] NA NA NA NA NA NA - attr(*, "names")= chr [1:6] "E" "F" "G" "H" ... double: NAs = TRUE, lag = 2, differences = 3, setNames = 0, useNames = 1 Named num [1:4] NA NA NA NA - attr(*, "names")= chr [1:4] "G" "H" "I" "J" Named num [1:4] NA NA NA NA - attr(*, "names")= chr [1:4] "G" "H" "I" "J" double: NAs = TRUE, lag = 2, differences = 4, setNames = 0, useNames = 1 Named num [1:2] NA NA - attr(*, "names")= chr [1:2] "I" "J" Named num [1:2] NA NA - attr(*, "names")= chr [1:2] "I" "J" double: NAs = TRUE, lag = 3, differences = 1, setNames = 0, useNames = 1 Named num [1:7] NA NA NA NA NA NA NA - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... Named num [1:7] NA NA NA NA NA NA NA - attr(*, "names")= chr [1:7] "D" "E" "F" "G" ... double: NAs = TRUE, lag = 3, differences = 2, setNames = 0, useNames = 1 Named num [1:4] NA NA NA NA - attr(*, "names")= chr [1:4] "G" "H" "I" "J" Named num [1:4] NA NA NA NA - attr(*, "names")= chr [1:4] "G" "H" "I" "J" double: NAs = TRUE, lag = 3, differences = 3, setNames = 0, useNames = 1 Named num NA - attr(*, "names")= chr "J" Named num NA - attr(*, "names")= chr "J" double: NAs = TRUE, lag = 3, differences = 4, setNames = 0, useNames = 1 Named num(0) - attr(*, "names")= chr(0) Named num(0) - attr(*, "names")= chr(0) double: NAs = TRUE, lag = 1, differences = 1, setNames = 0, useNames = 0 num [1:9] NA 0.673 8.826 NA NA ... num [1:9] NA 0.673 8.826 NA NA ... double: NAs = TRUE, lag = 1, differences = 2, setNames = 0, useNames = 0 num [1:8] NA 8.15 NA NA NA ... num [1:8] NA 8.15 NA NA NA ... double: NAs = TRUE, lag = 1, differences = 3, setNames = 0, useNames = 0 num [1:7] NA NA NA NA NA NA NA num [1:7] NA NA NA NA NA NA NA double: NAs = TRUE, lag = 1, differences = 4, setNames = 0, useNames = 0 num [1:6] NA NA NA NA NA NA num [1:6] NA NA NA NA NA NA double: NAs = TRUE, lag = 2, differences = 1, setNames = 0, useNames = 0 num [1:8] NA 9.5 NA NA NA ... num [1:8] NA 9.5 NA NA NA ... double: NAs = TRUE, lag = 2, differences = 2, setNames = 0, useNames = 0 num [1:6] NA NA NA NA NA NA num [1:6] NA NA NA NA NA NA double: NAs = TRUE, lag = 2, differences = 3, setNames = 0, useNames = 0 num [1:4] NA NA NA NA num [1:4] NA NA NA NA double: NAs = TRUE, lag = 2, differences = 4, setNames = 0, useNames = 0 num [1:2] NA NA num [1:2] NA NA double: NAs = TRUE, lag = 3, differences = 1, setNames = 0, useNames = 0 num [1:7] NA NA NA NA NA NA NA num [1:7] NA NA NA NA NA NA NA double: NAs = TRUE, lag = 3, differences = 2, setNames = 0, useNames = 0 num [1:4] NA NA NA NA num [1:4] NA NA NA NA double: NAs = TRUE, lag = 3, differences = 3, setNames = 0, useNames = 0 num NA num NA double: NAs = TRUE, lag = 3, differences = 4, setNames = 0, useNames = 0 num(0) num(0) > > proc.time() user system elapsed 0.29 0.07 0.35