R/return_yaml.R

Defines functions return_yaml

return_yaml <- function(yml,
                        path,
                        return_path,
                        handlers=NULL,
                        verbose=TRUE, 
                        ...){
  if(!is.null(path)){  
    save_yaml(yml=yml,
              path=path,
              handlers=handlers,
              verbose=verbose,
              ...)
    #### Return ####
    if(isTRUE(return_path)){
      return(path)
    } else {
      yml <- yaml::read_yaml(path)
      return(yml)
    }
  } else {
    return(yml)
  }
}

Try the rworkflows package in your browser

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

rworkflows documentation built on May 29, 2024, 2:37 a.m.