# row.names / names (note use `structure` to get around `data.frame` checks)

df.tpl <- structure(list(1:4, factor(LETTERS[1:4], levels = LETTERS)), 
    row.names = c("one", "", "", ""), names = c("id", ""), class = "data.frame")

df.cur <- `row.names<-`(data.frame(id = 5:8, val = factor(LETTERS[21:24], 
    levels = LETTERS)), c("one", "two", "tre", "qtr"))

df.cur2 <- `row.names<-`(data.frame(id = 5:8, val = factor(LETTERS[21:24], 
    levels = LETTERS)), c("uno", "due", "tre", "qtr"))

`names(df.tpl)[2]` should be "val" (is "")

[1] "`names(df.tpl)[2]` should be \"val\" (is \"\")"

`row.names(df.cur2)[1]` should be "one" (is "uno")

[1] "`row.names(df.cur2)[1]` should be \"one\" (is \"uno\")"

df.tpl <- structure(list(1:4, letters[1:4]), names = c("id", 
    NA), class = "data.frame")

df.cur <- structure(list(1:4, letters[1:4]), names = c("id", 
    "val"), class = "data.frame")

`names(df.cur)[2]` should be "NA" (is "val")

[1] "`names(df.cur)[2]` should be \"NA\" (is \"val\")"

[1] "`iris` should have 11 columns (has 5)"

`mtcars[1:10, ]` should have 32 rows (has 10)

[1] "`mtcars[1:10, ]` should have 32 rows (has 10)"

`mtcars` should have 10 columns (has 11)

[1] "`mtcars` should have 10 columns (has 11)"

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)"