![]() Occasional permission problems after unpacking source packages have been seen on some systems: these have been circumvented by setting the environment variable R_INSTALL_TAR to tar.exe. See Building R and packages for more details. The tools are found automatically by R when installed by the toolset installer. ![]() Those with compiled code need the tools (see The Windows toolset). No additional tools are needed if the package does not contain compiled code, and install.packages(type="source") will work for such packages. R CMD INSTALL works in Windows to install source packages. From R 4.2.0, they always contain only the 64-bit architecture. Windows binary packages for R are distributed as a single binary containing either or both architectures (32- and 64-bit). Rgui.exe has a menu Packages with a GUI interface to install.packages, update.packages and library. On Windows install.packages can also install a binary package from a local zip file (or the URL of such a file) by setting argument repos to NULL. If no binary version is available or the source version is newer, it will install the source versions of packages without compiled C/C++/Fortran code, and offer to do so for those with, if make is available (and this can be tuned by option ".source"). On Windows it looks (by default) first at the list of binary versions of packages available for your version of R and downloads the latest versions (if any). On Unix-alikes it consults the list of available source packages on CRAN (or other repository/ies), downloads the latest version of the package sources, and installs them (via R CMD INSTALL). What install.packages does by default is different on Unix-alikes (except macOS) and Windows. Naive users sometimes forget that as well as installing a package, they have to use library to make its functionality available. If the package depends on a version of R later than the one in use, it is possible that an earlier version is available which will work with your version of R: for CRAN look for ‘Old sources’ on the package’s CRAN landing page and manually retrieve an appropriate version (of comparable age to your version of R). ![]() In your R session, and look at the Depends and OS_type fields (there may be more than one matching entry). This is only an issue if you have more than one library, of course.Įnsure that the environment variable TMPDIR is either unset (and /tmp exists and can be written in and executed from) or is the absolute path to a valid temporary directory, not containing spaces.Īv <- available.packages( filters= list()) av = pkg, ] Note that you may need to specify implicitly or explicitly the library to which the package is to be installed. Binary packages are platform-specific and generally need no special tools to install, but see the documentation for your platform for details. Installing source packages which contain C/C++/Fortran code requires that compilers and related tools be installed. Packages may be distributed in source form or compiled binary form. This has a default value (to see it, use Sys.getenv("R_LIBS_USER") within an R session), but that is only used if the corresponding directory actually exists (which by default it will not).īoth R_LIBS_USER and R_LIBS_SITE can specify multiple library paths, separated by colons (semicolons on Windows). Users can have one or more libraries, normally specified by the environment variable R_LIBS_USER. See ?.libPaths for how to make use of the new value. ![]() 2 its binding is locked once the startup files have been read, so users cannot easily change it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |