R/wrapper.R

Defines functions process_time_data

Documented in process_time_data

#' Process TimetrackIO report
#'
#' Processes TimetrackIO report from start to finish
#'
#' @param dir_out directory to save the plot
#' @param file_in location of CSV data
#' @param date_start start date for plot
#' @param date_end end date for plot
#' @importFrom magrittr %>%
#' @export

process_time_data <- function(dir_out, file_in, date_start, date_end)

  # Produce data with text details
  file_in %>%
    time_1read() %>%
    time_2transform() %>%
    time_3plot(date_start = date_start,  date_end = date_end) %>%
    # Save as portrait A3
    ggplot2::ggsave(filename = glue::glue("{dir_out}/{date_start}-to-{date_end}-time.pdf"),
                    width = 420, height = 594, units = "mm")
andrewjpfeiffer/timetrackr documentation built on Feb. 21, 2020, 4:22 a.m.