Skip to contents

Calculate summary statistics for each questions of Moodle Grade Report (See Details).

Usage

questions_stats(data, show = NULL)

Arguments

data

(GradesReport) A data frame of class "GradesReport"

show

If NULL, show every parameters. Otherwise, specify which summary statistics you want to show as a character vector, any of: "n", "min", "max", "median", "Q1", "Q3", "IQR", "MAD", "mean", "SD", "skewness", and "kurtosis" (for excess kurtosis).

Value

a data frame of summary statistics

Details

questions_stats() calculate grouped summary statistics by questions ("Q"). You can specify which parameters to calculate by show argument.

Examples

library(moodleStats)
# Prepare
grades_df_preped <- prep_grades_report(grades_df)

# Calculate
questions_stats(grades_df_preped, show = c("n", "min", "max", "mean"))
#> # A tibble: 9 × 5
#>   Questions     n   min   max  mean
#>   <chr>     <int> <dbl> <dbl> <dbl>
#> 1 Q1          271     0     1 0.760
#> 2 Q2          269     0     1 0.941
#> 3 Q3          268     0     1 0.511
#> 4 Q4          269     0     1 0.822
#> 5 Q5          269     0     1 0.743
#> 6 Q6          269     0     1 0.684
#> 7 Q7          269     0     1 0.870
#> 8 Q8          267     0     1 0.708
#> 9 Q9          270     0     1 0.737