Cells of one question from a matrix of answer shares
Usage
cells_from_matrix(shares, counts = NULL, question = "")
Arguments
- shares
Matrix of answer shares, cell labels as row names, options as column names.
- counts
Respondents per cell, or NULL.
- question
Question id.
Value
A popfidelity_cells object.
Examples
shares <- rbind(A = c(yes = 0.2, no = 0.8), B = c(yes = 0.6, no = 0.4))
cells_from_matrix(shares, question = "toy")
#> <popfidelity_cells> toy: 2 cells, 2 options (yes, no)