grid_cell_counts: Form Grid Cell Counts

View source: R/GridProcessing.R

grid_cell_countsR Documentation

Form Grid Cell Counts

Description

Creates grids with aggregate cell counts (summed across items or respondents) out of LimeSurvey formatted grid item data.

Usage

grid_cell_counts(
  x,
  gridinfo,
  type = "items",
  reverse_code = NULL,
  return_table = FALSE,
  chosen_items = NULL
)

Arguments

x

data frame of grid-only LimeSurvey formatted data.

gridinfo

list. The output of grid_item_info.

type

character. Indicates whether to create cell counts for "items" or "respondents".

reverse_code

integer or logical. Values of 0 (FALSE) indicate items that are not reverse-coded, while values of 1 (TRUE) indicate items that are reverse coded.

return_table

logical. If TRUE a list of tables rather than matrices is returned.

chosen_items

integer vector indicating which grid items to include.

Value

A list of matrices, each of which is either the sum of all responses to a certain item (the default) or the sum of a certain respondent's answers for all items.


douglaswhitaker/GridItemTools documentation built on Aug. 2, 2022, 4:32 a.m.