R/loopfuns.R

Defines functions returns

#' @title Loop Functions
#' @description A set of functions to enhance loop functionality
#'
#' @param objs Vector of objects to return from function.
#' @param names Vector of names for the objects being returned.
#' @param env Environment to which objects should be returned.
#'
#' @import dplyr
#' @export returns
######################################

returns <- function(objs, names, env = .GlobalEnv){
  for (i in 1:length(objs)){
    assign(names[i],
      #deparse(substitute(objs[i])),
           objs[i],
           envir = env)
  }
}
colbyford/quilt documentation built on May 27, 2019, 2:08 p.m.