get_mean: takes data frame and regular expression and calculates the...

Description Usage Arguments Value Examples

View source: R/get_mean.R

Description

takes data frame and regular expression and calculates the mean for the given columns. Will take into account exemmptions

Usage

1
get_mean(df, RE)

Arguments

df

data frame of marks

RE

regular expression to choose columns to average

Value

vector of means

Examples

1
2
3
4
5
6
7
8
library(examMarking)
data("SMI_2018_marks")
SMI_2018_marks <- 
  SMI_2018_marks %>% 
  clean_marks_df("^A") %>% 
  get_prop_df("^A", 1)
SMI_2018_marks %>% 
  get_mean("^A")

jonotuke/examMarking documentation built on Nov. 26, 2019, 3:48 p.m.