Skip to content

Commit

Permalink
improve startup message
Browse files Browse the repository at this point in the history
  • Loading branch information
mnwright committed Dec 6, 2023
1 parent 93dd105 commit a0e8fcd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/onAttach.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
threads_option <- getOption("ranger.num.threads")
threads_env <- Sys.getenv("R_RANGER_NUM_THREADS")
if (!is.null(threads_option)) {
thread_string <- paste(threads_option, "threads (set by options(ranger.num.threads = N).")
thread_string <- paste(threads_option, "threads as set by options(ranger.num.threads = N). Can be overwritten with num.threads.")
} else if (threads_env != "") {
thread_string <- paste(threads_env, "threads (set by environment variable 'R_RANGER_NUM_THREADS').")
thread_string <- paste(threads_env, "threads as set by environment variable R_RANGER_NUM_THREADS. Can be overwritten with num.threads.")
} else {
thread_string <- "2 threads (default). Change with num.threads in ranger() and predict(), options(ranger.num.threads = N) or environment variable 'R_RANGER_NUM_THREADS'."
thread_string <- "2 threads (default). Change with num.threads in ranger() and predict(), options(ranger.num.threads = N) or environment variable R_RANGER_NUM_THREADS."
}

packageStartupMessage(paste("ranger", packageVersion("ranger"), "using", thread_string))
Expand Down

0 comments on commit a0e8fcd

Please sign in to comment.