createBlockIDs

0th

Percentile

Create vector of integers containing block identifiers

Creates a vector of integers which represent unique blocks in an object output from block or assignment.

Keywords
design
Usage
createBlockIDs(obj, data, id.var)
Arguments
obj
an output object from block or assignment.
data
the data frame that was input into block for blocking.
id.var
a string specifying which column of data contains identifying information.
Details

Under the current implementation, level.two in block should be set to FALSE.

If blocking was performed specifying a groups argument, createBlockIDs will assign block ID values that are unique across groups. In other words, createBlockIDs does not restart numbering when it encounters a new group of blocks.

Value

A numeric vector of integers with nrow(data) elements with lowest value equal to 1, corresponding to the block each unit is in. For units in data that are not in obj, the value of NA is assigned.

See Also

block, assignment

Aliases
  • createBlockIDs
Examples
data(x100)
out <- block(x100, groups = "g", n.tr = 2, id.vars = c("id"), block.vars
             = c("b1", "b2"))
createBlockIDs(out, x100, id.var = "id")
## block ID integers are unique, even with several groups
Documentation reproduced from package blockTools, version 0.6-3, License: GPL (>= 2) | file LICENSE

Community examples

Looks like there are no examples yet.