R/validate.R

Defines functions validate

Documented in validate

#' Validate input data
#'
#' Validate input data for correctness and adds calculated variables such log
#' slope
#'
#' @param data Data frame of macrophyte taxonomic data and/or predictors
#'
#' @return Data frame of validated input data
#' @export
#'
#' @examples
#' \dontrun{
#' data <- validate(1)
#' }
validate <- function(data) {
  message("Validating data...")

  # Function to check for fatal errors i.e. no data entered

  # Function to add calculate variables e.g. log values etc
  data <- data[data$quality_element == "River Macrophytes",]
  data <- calculated_values(data)


  # Function to validate each sample individually (removing invalid)

  # ...
  return(data)
}
aquaMetrics/leafpacs documentation built on Feb. 5, 2022, 9:10 a.m.