analyse_log: Analyse the Log and Plot Quiz History

View source: R/analyse_log.R

analyse_logR Documentation

Analyse the Log and Plot Quiz History

Description

Read in and analyse the log file that is written by the WordBox shiny app. Create a plot of quiz history with various options.

Usage

analyse_log(file)

plot_quiz_per_date(
  log,
  y = c("duration", "n_quizzed", "n_correct", "n_wrong"),
  colour = c("file", "direction", "type", "mode", "group"),
  date_range = NULL,
  language = c("en", "de"),
  interactive = rlang::is_installed("plotly")
)

Arguments

file

path to the log file

log

a tibble of quiz data created by 'analyse_log()'

y

the variable to be used for the y-axis

colour

the variable used for colour

date_range

date vector of length to giving the data range to be plotted. If omitted, all the data is plotted.

language

language for the plot labels

interactive

create an interactive plot? This requires 'plotly' and is set to 'TRUE' by default, if 'plotly' is installed. If set to 'TRUE' by the user, the function will ask to install 'plotly' if no existing installation is found.

Value

a tibble with one row per quiz for 'analyse_log()'. A 'ggplot2' or 'plotly' plot for 'plot_quiz_per_date()'.


stibu81/WordBox documentation built on Nov. 28, 2024, 2:29 p.m.