R/check.os.R

check.os <- function(options){
  
  os <- 2
  tmp <- .C('check_os', os = as.integer(os), PACKAGE = "ARTP2")
  if(!(tmp$os %in% 0:1)){
    msg <- 'Failed to indentify the OS. Please contact the authors. '
    stop(msg)
  }
  options$os <- ifelse(tmp$os == 0, 'windows_or_mac', 'linux')
  msg <- paste0('ARTP2 ', ifelse(options$os == 'windows_or_mac', 'does not support ', 'supports '), 'multi-threading on this OS')
  if(options$print) message(msg)
  
  options
  
}

Try the ARTP2 package in your browser

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

ARTP2 documentation built on May 2, 2019, 3:38 p.m.