Description Usage Arguments Details Value Examples
The qb_blocking
function constructs a qb_blocking
object from
existing block labels. The function does not derive blockings from
sets of data points; see quickblock
for that functionality.
1 | qb_blocking(block_labels, unassigned_labels = NULL, ids = NULL)
|
block_labels |
a vector containing each unit's block label. |
unassigned_labels |
labels that denote unassigned units. If |
ids |
IDs of the units. Should be a vector of the same length as
|
qb_blocking
objects are based on integer vectors, and it indexes
the blocks starting with zero. The qb_blocking
class inherits
from the scclust
class.
Returns a qb_blocking
object with the blocking described by the
provided labels.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # 10 units in 3 blocks
blocking1 <- qb_blocking(c("A", "A", "B", "C", "B",
"C", "C", "A", "B", "B"))
# 8 units in 3 blocks, 2 units unassigned
blocking2 <- qb_blocking(c(1, 1, 2, 3, 2,
NA, 3, 1, NA, 2))
# Custom labels indicating unassigned units
blocking3 <- qb_blocking(c("A", "A", "B", "C", "NONE",
"C", "C", "NONE", "B", "B"),
unassigned_labels = "NONE")
# Two different labels indicating unassigned units
blocking4 <- qb_blocking(c("A", "A", "B", "C", "NONE",
"C", "C", "0", "B", "B"),
unassigned_labels = c("NONE", "0"))
# Custom unit IDs
blocking5 <- qb_blocking(c("A", "A", "B", "C", "B",
"C", "C", "A", "B", "B"),
ids = letters[1:10])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.