TRUE when every unit of a combines with the same set of units of b, as the months and hours of a MONTH x HOUR calendar do: the frames overlay rather than nest, and the atoms are their combinations. The complement of scale_nests() for the other common shape; a pair can be neither.

scale_crosses(x, a, b)

Arguments

x

A NestedScale.

a, b

Frame names.

Value

A logical scalar. When FALSE, the attribute "offenders" names the units of a whose set of b units differs from the first one's.

Examples

s <- scale_example()
scale_crosses(s, "class", "group")
#> [1] FALSE
#> attr(,"offenders")
#> [1] "G2" "S1"

grid <- expand.grid(m = c("m1", "m2"), h = c("h1", "h2", "h3"),
                    stringsAsFactors = FALSE)
grid$unit <- paste(grid$m, grid$h, sep = "_")
mh <- scale_from_leaftable(grid, frames = c("m", "h"), key = "unit")
scale_crosses(mh, "m", "h")
#> [1] TRUE
scale_nests(mh, "m", "h")
#> [1] FALSE
#> attr(,"offenders")
#> [1] "h1" "h2" "h3"