Create R Windows Binary from .tar.gz linux

This is similar to the previous post. I have a need to use the bigmemory library on my 32-bit Windows PC to do some ugly matrix calculations. Unfortunately, the maintainers seem to have temporarily stopped production of Windows binaries. I have Ubuntu on my home PC. I would really like to take the .tar.gz file and compile it into a Windows binary, which I really can run at work. I understand that there are more efficient ways, such as installing RTools on a Windows device. However, our IT services support our administrator rights to lock, so I can never edit the PATH enviro variable. Can anyone give a general guide for this? Are there any tools that I need to install on my Ubuntu PC above and above R?

I found similar questions, but did not answer my questions.

+4
source share
2 answers

If the package source is not compatible with current versions of R, you can use the win-builder project to create a Windows binary. Quote from a linked site, win-builder is a service:

designed to use rs that do not have windows available for checking and creating windows binary packages.

As a convenience, the Hadley Wickham devtools package includes a build_win() utility function that you can use for this purpose. From ?build_win :

It works by creating the source package, and then uploading it to the site http://win-builder.r-project.org/ ">. After the construction is complete, you will receive a link to the built-in package in the email address specified in the support field. This usually takes about 30 minutes.

+3
source

Windows has four sets of environment variables (system, user, mutable, and process set). The first three sets are stored in the registry, but the set of processes is not so, even if they blocked the registry, as a rule, you can still set process environment variables (including PATH) in the local process, that is, on a temporary basis, so you can double-check your assumptions that you can’t change anything. Most likely, you cannot change the system variables and registry, but you can change the set in your local process. To verify this from the Windows cmd line, enter the following:

 set mytest=123 set mytest 

and if the second line shows that mytest is 123 , then you probably have all the necessary permissions.

In addition, everything you need to install is automatically processed by you R.bat in the distribution of batch files , so you do not need to install wow.

Just make sure that Rtools and R are installed in standard locations (you can tell them to skip the configuration of any registry keys during the installation process), make sure that R.bat is in your path or in the current directory and starts:

 R.bat CMD INSTALL mypackage.tar.gz 

without setting environment variables, registry keys, or paths.

If this does not work, try Rpathset.bat also from batch files, which is not automatic, for example R.bat , but, on the other hand, is extremely flexible, since you must modify the SET statutes in it as you want.

There is a PDF document that comes with batch files that contain additional information.

+2
source

Source: https://habr.com/ru/post/1482673/


All Articles