You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
629 B

.onAttach <- function(libname, pkgname) {
if (interactive()) {
if ( unname(Sys.info()["sysname"] == "Windows") ){
if ( unname(Sys.info()["machine"] == "x86-64") ) {
Sys.setenv(HEADLESS_CHROME="C:/Program Files (x86)/Google/Chrome/Application/chrome.exe")
} else {
Sys.setenv(HEADLESS_CHROME="C:/Program Files/Google/Chrome/Application/chrome.exe")
}
}
if ( unname(Sys.info()["sysname"] == "Darwin") ){
Sys.setenv(HEADLESS_CHROME="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome")
}
# check other os
chrome_bin <- Sys.getenv("HEADLESS_CHROME")
}
}