|
10 | 10 | #' use [cata_prep()] first to transform `data`into the proper format. See _Examples_. |
11 | 11 | #' |
12 | 12 | #' @inheritParams cata_prep |
13 | | -#' @param categ Column in `data` indicating the check-all-that apply category labels. |
14 | | -#' @param resp Column in `data` indicating the check-all-that apply responses. |
15 | | -#' @param approach One of "all", "count", "multiple", "priority", or "mode". See _Details_. |
| 13 | +#' @param categ Unquoted column in `data` indicating the check-all-that apply category labels. |
| 14 | +#' @param resp Unquoted column in `data` indicating the check-all-that apply responses. |
| 15 | +#' @param approach One of "all", "counts", "multiple", "priority", or "mode". See _Details_. |
16 | 16 | #' @param endorse The value in `resp` indicating endorsement of the category in `categ`. This must be the same for all categories. |
17 | 17 | #' Common values are 1 (default), "yes", TRUE, or 2 (for SPSS data). |
18 | 18 | #' @param priority Character vector of one or more categories in the `categ` column indicating the order to prioritize |
|
28 | 28 | #' |
29 | 29 | #' There are two options for `approach` that provide summary information rather than a single code for each `id`. |
30 | 30 | #' |
31 | | -#' *`"all"` returns a data frame with `new.name` variable comprised of all categories |
| 31 | +#' `"all"` returns a data frame with `new.name` variable comprised of all categories |
32 | 32 | #' endorsed by separated by `sep`. The `time` argument is ignored when `approach = "all"`. Rather, |
33 | 33 | #' if `data` includes a column for time, then output includes a row for each `id` at each time point. |
34 | 34 | #' This approach is a useful exploratory first step for identifying all of the response patterns present in the data. |
35 | 35 | #' |
36 | | -#' *`"counts"` is only relevant for longitudinal data and returns a data frame with the number of times an `id` endorsed |
| 36 | +#' `"counts"` is only relevant for longitudinal data and returns a data frame with the number of times an `id` endorsed |
37 | 37 | #' a category. Only categories with >= 1 endorsement are included for a particular `id`. As with `"all"`, the `time` argument |
38 | 38 | #' is ignored and instead assumes `data` is in longer format with a row for each `id` by `time` combination. If not, |
39 | 39 | #' the column of counts will be 1 for all rows. |
|
44 | 44 | #' participants who only selected one category will be given that code in the output |
45 | 45 | #' regardless of which approach is chosen. |
46 | 46 | #' |
47 | | -#' *`"multiple"` If participant endorsed multiple categories within or across time, code as `multi.name`. |
| 47 | +#' `"multiple"` If participant endorsed multiple categories within or across time, code as `multi.name`. |
48 | 48 | #' |
49 | | -#' *`"priority"` Same as "multiple" unless participant endorsed category in `priority` argument at any point. |
| 49 | +#' `"priority"` Same as "multiple" unless participant endorsed category in `priority` argument at any point. |
50 | 50 | #' If so, then code in order specified in `priority`. |
51 | 51 | #' |
52 | | -#' *`"mode"` Participant is coded as the category with the mode (i.e., most common) endorsement across all time points. |
| 52 | +#' `"mode"` Participant is coded as the category with the mode (i.e., most common) endorsement across all time points. |
53 | 53 | #' Ties are coded as as the value given in `multi.name`. If the `priority` argument is specified, these categories are prioritized |
54 | 54 | #' first, followed by the mode response. The `"mode"` approach is only relevant if `time` is specified. |
55 | 55 | #' When `time = NULL` it operates as `"priority"` (when specified) or `"multiple"`. |
|
0 commit comments