Some possibilities include:
Sys.info()["machine"] == "x86-64"
.Platform$r_arch == "x64"
version$arch == "x86_64"
Is there any reason to prefer one method over another?
Related: detecting operating system in R (e.g. for adaptive .Rprofile files)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Actually none of those methods would be canonical, which I take to mean “what would Brian Ripley say”. Try this:
sizeof.pointer……..the number of bytes in a C SEXP type. Will be 4 on 32-bit builds and 8 on 64-bit builds of R.
As for your nominations only one of them returns TRUE on my machine: