R/create_stack.R

#' Create a new jenga stack
#'
#' @param slot.names A vector of names for the stack to be created.
#' @return stack, an empty list named as given by \code{slot.names}, and of length of the input vector.
#' @export
#' @examples
#'
#' my.stack <- create_stack(c("Variable 1", "Variable 2", "Variable 3"))

create_stack <- function(slot.names){

  stack <- vector("list", length(slot.names))
  names(stack) <- slot.names
  return(stack)

}
sarahromanes/jenga documentation built on May 13, 2019, 1:40 p.m.