Convert data to split format
split_lists.Rd
Convert study, recall, or all events to list format.
Arguments
- data
Free recall data in raw or merged format.
- phase
Phase of free recall ('study' or 'recall') to split. If ‘raw’, all trials will be included.
- keys
Data columns to include in the split data. If not specified, all columns will be included.
- names
Name for each column in the returned split data. Default is to use the same names as the input columns.
- item_query
Query string to select study trials to include.
Examples
# Create raw and merged data
list_subject <- list(1, 1)
study <- list(list("absence", "hollow"), list("fountain", "piano"))
recall <- list(list("absence"), list("piano", "fountain"))
raw <- table_from_lists(list_subject, study, recall)
data <- merge_free_recall(raw)
# Get study events split by list, just including the list and item fields.
split_lists(data, "study", keys = list("list", "item"))
#> $list
#> $list[[1]]
#> [1] 1 1
#>
#> $list[[2]]
#> [1] 2 2
#>
#>
#> $item
#> $item[[1]]
#> [1] "absence" "hollow"
#>
#> $item[[2]]
#> [1] "fountain" "piano"
#>
#>
# Export recall events, split by list.
split_lists(data, "recall", keys = list("item"))
#> $item
#> $item[[1]]
#> [1] "absence"
#>
#> $item[[2]]
#> [1] "piano" "fountain"
#>
#>
# Raw events (i.e., events that haven’t been scored) can also be exported to
# list format.
split_lists(raw, "raw", keys = list("position"))
#> $position
#> $position[[1]]
#> [1] 1 2 1
#>
#> $position[[2]]
#> [1] 1 2 1 2
#>
#>