Skip to contents

Takes data as delivered by CCAL, extracts it, and rewrites it to tabs in an xlsx file or csv files in a folder.

Usage

machineReadableCCAL(
  files,
  format = c("xlsx", "csv"),
  destination_folder = "./",
  overwrite = FALSE
)

Arguments

files

Path to .xlsx file delivered by CCAL. Use a character vector to specify multiple files.

format

File format to export machine readable data to - either "xlsx" or "csv"

destination_folder

Folder to save the data in. Defaults to current working directory. Folder must already exist.

overwrite

Overwrite existing file (Defaults to TRUE as with write.table)

Value

Invisibly returns a list containing the data that were written to file.

Examples

if (FALSE) {
ccal_folder <- "ccal_results"
dest_folder <- "ccal_results/tidied"
file_list <- list.files(ccal_folder, pattern = "*.xlsx$", full.names = TRUE)
machineReadableCCAL(file_list, format = "xlsx", destination_folder = dest_folder)
machineReadableCCAL(file_list, format = "csv", destination_folder = dest_folder)
}