wg2ws_items {cdiWG2WS} | R Documentation |
List of items to category table
Description
Given a list of items, create a table of category scores
Usage
wg2ws_items(items, error_on_missing = TRUE, in_inside = "either")
Arguments
items |
List of WG items present for individual. |
error_on_missing |
If TRUE, check whether all items are actual WG
items. See helper function |
in_inside |
"In" and "inside" appear as two items on WG, but one ("inside/in") on WS. If "either," treat "inside/in" as endorsed if either appears. For "both", both must be endorsed. For "in" or "inside", treat "inside/in" as endorsed based solely on the presence of the indicated item. |
Details
Requires a list that exactly matches items as labeled from Wordbank
(check g_dict). Converts to a table of category scores, ready for use
with wg2ws_category_score()
.
Value
A data frame with 22 rows indicating item totals for all WS
categories. These values are not adjusted, and need to be adjusted with
wg2ws_category_score()
.
Examples
# Create list of words a child knows
words <- c("smile", "old", "chicken (animal)", "breakfast", "snow", "uh oh",
"please", "bad", "bicycle", "moon")
# Create table
categories <- wg2ws_items(words)