Writing an R package that is different for each architecture

I am writing an R package in which you can create networks and output them in different types of files. I found the SVGRTipsDevice package that can be used to create SVG images containing tooltips and hyperlinks that I really like. I included this in my package as one of the output options, which makes it an integral part of my package, but part of it nonetheless (the one I want to keep).

The problem is that this package is intended only for 32-bit users. Since my package depends on this, 64-bit users cannot install it. It seems to me that I either have to make my package only 32 bits, or remove the capabilities of SVG (currently I chose the latter to upload to CRAN with a link to the full package on my site).

Is there a way to do this differently? How to make the package accessible for everyone, but only make SVG features available for 32-bit users?

+5
source share
3 answers

, : : DESCRIPTION , 32/64- . - ok <- suppressWarnings(require(SVGToolTips))), , .onLoad .

+4

, Sys.info() :

, :

 Sys.info()["machine"]
 machine 
"x86_64" 

, , , R 32 64 . , 64- 32- R, x86_64 , :

R.Version()$arch
[1] "x86_64"

, , 64- . 64- R.

+6

packagename-32bit .

0

All Articles