Skip to contents

Cells of one question from a long table with one row per cell and option

Usage

cells_from_long(
  frame,
  question = NULL,
  options = NULL,
  cell = "cell_id",
  option = "option",
  share = "share",
  count = "n"
)

Arguments

frame

A data frame with columns for the cell, option and share.

question

Question id to keep, or NULL for every row.

options

Option order, or NULL for the order of first appearance.

cell, option, share, count

Column names; count may be NULL.

Value

A popfidelity_cells object with cells sorted by label.