R/onAttach.R

Defines functions .onAttach

.onAttach <- function(lib, pkg){
  if(is_rapache()){

    #for the log files
    packageStartupMessage("OpenCPU cloud server ready.")

  } else {

    #This will start XQuartz in OSX
    capabilities()

    #Dont run in rscript
    packageStartupMessage("Welcome to OpenCPU!")

    #start rhttpd only in rstudio server
    if(is_rstudio_server()){
      rhttpd_init()
    }
  }
}

Try the opencpu package in your browser

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

opencpu documentation built on Aug. 7, 2023, 5:12 p.m.