Skip to content

Commit

Permalink
update getBits again
Browse files Browse the repository at this point in the history
  • Loading branch information
mnneely committed May 13, 2024
1 parent fcd8c3d commit 369100f
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions R/PMconfig.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@ getPMpath <- function() {

getBits <- function() {
# figure out 32 or 64 bit
if (length(grep("32-bit", utils::sessionInfo())) > 0) {
return(32)
} else if (length(grep("64-bit", utils::sessionInfo())) > 0) {
return(64)
Rver <- numeric_version(paste(R.version$major, R.version$minor,sep = "."))
if(Rver < numeric_version("4.4.0")){
if (length(grep("64-bit", utils::sessionInfo())) > 0) {
return(64)
} else {
return(32)
}
} else {
cat(crayon::yellow("Warning:"),"Processor bits not detected. Default 64 bits used.\n",
"Compiler may fail. If so, please post issue on github.\n")
return(64)
if (length(grep("32-bit", utils::sessionInfo())) > 0) {
return(32)
} else {
return(64)
}
}
}

Expand Down

0 comments on commit 369100f

Please sign in to comment.