Learn R Programming

EcoHydRology (version 0.3.7)

setup_swatcal: A function to setup a swat calibration

Description

A function to setup a swat calibration, building the template *.unixorig template files, and cleaning up oddities we find in the default input files. (eg file.cio has cst.cst file which appears to be a bug)

Usage

setup_swatcal(change_params)

Arguments

change_params

Value

    Examples

    Run this code
    ##---- Should be DIRECTLY executable !! ----
    ##-- ==>  Define data, use random,
    ##--	or do  help(data=index)  for the standard data sets.
    
    ## The function is currently defined as
    function(change_params){
    library(operators)
    for(ft in unique(change_params$filetype)){
            print(ft)
            files=list.files(,paste(ft,"$",sep=""))
            for (file in files) {
                    junk%<%file
                    junk=gsub("r","",junk)
                    file_swatcal=paste(file,".unixorig",sep="");
                    cat(junk,file=file_swatcal,sep="")
            }
      }
      }

    Run the code above in your browser using DataLab