Returns descriptive statistics about a column of choice. A simple convenience function that wraps
dplyr::group_by
and dplyr::summarize
, allowing a quick glance at the data.
describe_data(
data,
describe_column,
group_columns,
quantiles = c(0.025, 0.975)
)
Data already run through make_eyetrackingr_data
The column to return descriptive statistics about.
Any columns to group by when calculating descriptive statistics (e.g., participants, conditions, etc.)
Numeric vector of length two with quantiles to compute (default: c(.025, .975)
).
A dataframe giving descriptive statistics for the describe_column
, including mean, SD, var,
min, max, and number of trials
data(word_recognition)
data <- make_eyetrackingr_data(word_recognition,
participant_column = "ParticipantName",
trial_column = "Trial",
time_column = "TimeFromTrialOnset",
trackloss_column = "TrackLoss",
aoi_columns = c('Animate','Inanimate'),
treat_non_aoi_looks_as_missing = TRUE
)
describe_data(data, describe_column = "Animate", group_columns = "ParticipantName")
#> # A tibble: 28 × 9
#> ParticipantName Mean SD LowerQ UpperQ Min Max N NumTrials
#> <fct> <dbl> <dbl> <dbl> <dbl> <int> <int> <int> <int>
#> 1 ANCAT139 0.397 0.490 0 1 0 1 1262 1
#> 2 ANCAT18 0.626 0.484 0 1 0 1 7583 6
#> 3 ANCAT22 0.434 0.496 0 1 0 1 6314 5
#> 4 ANCAT23 0.791 0.407 0 1 0 1 7582 6
#> 5 ANCAT26 0.648 0.478 0 1 0 1 7586 6
#> 6 ANCAT39 0.699 0.459 0 1 0 1 7582 6
#> 7 ANCAT45 0.543 0.498 0 1 0 1 7579 6
#> 8 ANCAT50 0.785 0.411 0 1 0 1 7579 6
#> 9 ANCAT53 0.527 0.499 0 1 0 1 6322 5
#> 10 ANCAT55 0.652 0.476 0 1 0 1 7578 6
#> # ℹ 18 more rows