ts.2 <- ts(runif(24), 1970, frequency = 4)

ts.5 <- ts(matrix(runif(24 * 3), ncol = 3), 1970, frequency = 12)

ts.6 <- ts(matrix(runif(12 * 3), ncol = 3), 1970, frequency = 12)

alike(ts.5, matrix(runif(24 * 3), ncol = 3))

`matrix(runif(24 * 3), ncol = 3)` should be class "mts" (is "numeric")

[1] "`matrix(runif(24 * 3), ncol = 3)` should be class \"mts\" (is \"numeric\")"

f2 <- factor(letters[1:5], levels = letters[5:1])

env1 <- list2env(list(a = character(), b = list(), c = NULL))

env2 <- list2env(list(a = "hello", b = iris, c = matrix(1:3)))

env3 <- list2env(list(a = "hello", b = iris))

env4 <- list2env(list(a = "hello", b = iris, c = logical(1L), 
    d = logical(1L)))

env5 <- list2env(list(b = iris, a = "hello", c = matrix(1:3)))

[1] "`env3` should contain variable `c`"

[1] "`length(env1$a)` should be 1 (is 0)"

# TRUE length mismatch but longer allowed

for (i in 1:50) {
    rec.env.cpy$a <- new.env()
    rec.env.cpy <- rec.env.cpy$a
}

plst1 <- pairlist(a = character(), b = list(), c = NULL)

plst2 <- pairlist(a = "hello", b = iris, c = matrix(1:3))

plst3 <- pairlist(a = "hello", b = iris)

plst4 <- pairlist(a = "hello", b = iris, c = logical(1L), d = logical(1L))

plst5 <- pairlist(a = character(), b = list(), integer())

plst6 <- pairlist(a = character(), b = list(), boogey = 1:3)

plst7 <- pairlist(a = character(), boogey = 1:3, b = list())

[1] "`length(plst3)` should be 3 (is 2)"

[1] "`length(plst4)` should be 3 (is 4)"

`names(plst5)[[3L]]` should be "c" (is "")

`names(plst7)[[2L]]` should be "b" (is "boogey")

[1] "`names(plst7)[[2L]]` should be \"b\" (is \"boogey\")"

env7 <- list2env(list(a = character(), b = plst1))

env8 <- list2env(list(a = letters[1:3], b = plst2))

env9 <- list2env(list(a = letters[1:3], b = plst5))

`names(env9$b)[[3L]]` should be "c" (is "")

env.nest.1 <- env.nest.1.cpy <- new.env()

env.nest.2 <- env.nest.2.cpy <- new.env()

for (i in 1:26) {
    env.nest.1.cpy[[letters[i]]] <- new.env()
    env.nest.1.cpy <- env.nest.1.cpy[[letters[i]]]
    env.nest.2.cpy[[letters[i]]] <- new.env()
    env.nest.2.cpy <- env.nest.2.cpy[[letters[i]]]
}