R/create_grade_sheet.R

Defines functions create_grade_sheet

Documented in create_grade_sheet

#' Create the grade sheets
#'
#' @param file_paths Location of the grade sheets.
#' @param write_to The CSV file to write the grade sheet to.
#'
#' @return Grade sheet tibble (invisibly).
#' @export
create_grade_sheet <- function(file_paths, write_to = NULL) {
  file_paths %>%
    purrr::map(read_notebook) %>%
    purrr::map(extract_grade_row) %>%
    dplyr::bind_rows() %>%
    readr::write_excel_csv(path = write_to, na = '')
}
adamblake/nbsimplegrader_companion documentation built on April 19, 2020, 6:05 p.m.