R/zzz.R

Defines functions .onAttach

.onAttach <- function(libname, pkgname) {
  netrc <- ifelse(.Platform$OS.type == "windows", "~/_netrc", "~/.netrc")

  if (!file.exists(netrc) &&
    !exists("labkey.sessionCookieName") &&
    !exists("apiKey", where = Rlabkey:::.lkdefaults) &&
    Sys.getenv("ISR_login") == "") {
    packageStartupMessage("A .netrc file is required to connect to ImmuneSpace. For more information on how to create one, refer to the Configuration section of the introduction vignette.")
  }
}
RGLab/ImmuneSpaceR documentation built on Jan. 5, 2023, 10:24 a.m.