R/check.R

Defines functions check_timesheet

Documented in check_timesheet

#' Check Time Sheet
#'
#' @param x A data frame to check.
#' @inheritParams checkr::check_data
#' @return An invisible copy of x (if it doesn't throw an error).
#' @export
#' @examples
#' check_timesheet(poistimesheets::timesheet)
check_timesheet <- function(x, nrow = NA, exclusive = FALSE, order = FALSE) {
  check_data(x, values = 
               list(
                 Date = c(as.Date("2011-05-22"), Sys.Date()), 
                 Member = "", 
                 Project = "", 
                 Task = "",
                 Hours = c(0, 24), 
                 Billable = TRUE), 
             nrow = nrow, exclusive = exclusive, order = order)
}
poissonconsulting/poistimesheets documentation built on Jan. 24, 2020, 4:54 a.m.