vis_response_counts {studentlife} | R Documentation |
vis_response_counts
Description
Produce an ordered bar plot of the total number of responses for each student in a regularised SL_tbl.
Usage
vis_response_counts(
tab,
response,
main = paste0("Total responses by student (", attr(tab, "table"), ")"),
xlab = "Student UID",
ylab = "Response count",
...
)
Arguments
tab |
A regularised StudentLife tibble (i.e., an object of class
|
response |
A character string naming one of the columns
in |
main |
The plot title, passed to |
xlab |
The x axis label, passed to |
ylab |
The y axis label, passed to |
... |
Arguments passed to |
Value
A named numeric vector of response counts, sorted in descending order.
Examples
d <- tempdir()
download_studentlife(location = d, url = "testdata")
tab_PAM <- load_SL_tibble(schema = "EMA", table = "PAM", location = d)
reg_PAM <- regularise_time(
tab_PAM, blocks = c("day", "epoch"), m = mean(picture_idx, na.rm = TRUE))
vis_response_counts(reg_PAM, response = "m")
[Package studentlife version 1.1.0 Index]