R/saveResults.R

Defines functions saveResults

Documented in saveResults

#'  A utility program for saving the contents of the workspace
#'   
#'  This function saves the workspace. Future versions of EGRET will not include this function,
#'  use saveRDS to save individual eList objects.
#'  It assigns the file a name using the abbreviations for station and constituent.
#'
#' @param savePath character specifying the full pathname of the folder where the file is to be saved ending with the final slash
#' @param eList named list with at least the INFO dataframe
#' @keywords water-quality statistics
#' @export
saveResults<-function(savePath, eList){

  INFO <- getInfo(eList)
  saveName <- paste0(savePath, INFO$staAbbrev, ".", INFO$constitAbbrev, 
                    ".RData")
  save.image(file=saveName)
}

Try the EGRET package in your browser

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

EGRET documentation built on April 18, 2023, 5:09 p.m.