R/start0.R

Defines functions start0

Documented in start0

#' Start function to build list structures
#'
#' @return
#' @export
#'
#' @importFrom rlist list.append
#'
#'
start0 <- function() {


  if(!"info" %in% objects(pos = .GlobalEnv)) {

    message(getwd())

    wd <- ok("Working directory correct?")

    if(!wd) {
      message("Please set working directory and try again.")
    }

    else if(wd) {
      assign("info", list(), pos = .GlobalEnv)
      assign("info", list.append(info, getwd()), pos = .GlobalEnv)
      names(info)[length(info)] <- "working directory"
      assign("info", info, pos = .GlobalEnv)
      assign("raw.data", list(), pos = .GlobalEnv)
      assign("dat", list(), pos = .GlobalEnv)
    }

  }

  else {
    message("Info file already exists")
  }

}
nicohuttmann/htmnanalysis documentation built on Dec. 6, 2020, 3:02 a.m.