R/GoF.R

Defines functions GoF

Documented in GoF

# goodness-of-fit from data.frame
# author: J.A. Torres-Matallana
# organization: Luxembourg Institute of Science and Technology (LIST), Luxembourg
#               Wagenigen University and Research Centre (WUR), Wageningen, The Netherlands   
# date: 14.07.2015 - 14.07.2015

GoF <- function(eval, col_sim, col_obs, name){
  requireNamespace("hydroGOF")
  gof1 <- gof(sim = as.numeric(eval[,col_sim]), obs = as.numeric(eval[,col_obs]), digits=9) # should be gof(sim, obs)
  
  colnames(gof1) <- c("")
  
  ## uncomment to create .csv and .RData files
  # if(!missing(name)){
  #   write.table(gof1, file = paste("gof",name,".csv", sep=""), 
  #               sep = ",", qmethod = "double", row.names=TRUE, col.names=FALSE)
  #   save(gof1, file=paste("gof",name,".RData", sep=""))  
  # }
  
  return(gof1)
}

Try the stUPscales package in your browser

Any scripts or data that you put into this service are public.

stUPscales documentation built on Sept. 18, 2023, 9:07 a.m.