R/add_fit.R

Defines functions add_FIT

Documented in add_FIT

#' Function to add \%FIT to stats
#'
#' @description Function to read, add \%FIT and write stats
#'
#' @param file model data.frame
#' @param verbose display additional information
#'
#' @export
#'
add_FIT <- function(file = file.choose(), verbose = F){
  input <- read.stat(file = file)
  if('FIT (%)' %in% names(input)){
    cat(file,'already contains FIT (%)\n')
  }else{
    fit   <- input$FA2 * 100
    write.stat(stat = cbind(input,`FIT (%)` = fit),file = file)
  }
}
Schuch666/hackWRF documentation built on June 9, 2025, 1:46 p.m.