Skip to content

Commit

Permalink
Deploying to gh-pages from @ 1ae810d 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
andrie committed Nov 17, 2024
1 parent e0e6377 commit 277b3cf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
5 changes: 2 additions & 3 deletions r-admin/Add-on-packages.html
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ <h3 class="subsection anchored" data-number="6.3.1" data-anchor-id="windows"><sp
</section>
<section id="macos" class="level3 subsection page-columns page-full" data-number="6.3.2">
<h3 class="subsection anchored" data-number="6.3.2" data-anchor-id="macos"><span class="header-section-number">6.3.2</span> macOS</h3>
<p>On macOS <code>install.packages</code> works as it does on other Unix-alike systems, but there is an additional type <code>mac.binary</code> (available for the CRAN distribution but not when compiling R from source) which can be passed to <code>install.packages</code> in order to download and install binary packages from a suitable repository. These binary package files for macOS have the extension <code>.tgz</code>. The <span class="small">R.APP</span> GUI provides menus for installation of either binary or source packages, from CRAN, other repositories or local files.</p>
<p>On macOS <code>install.packages</code> works as it does on other Unix-alike systems, but there is an additional type <code>binary</code> (available for the CRAN distribution but not when compiling R from source) which can be passed to <code>install.packages</code> in order to download and install binary packages from a suitable repository. These binary package files for macOS have the extension <code>.tgz</code>. The <span class="small">R.APP</span> GUI provides menus for installation of either binary or source packages, from CRAN, other repositories or local files.</p>
<p>On R builds using binary packages, the default is type <code>both</code>: this looks first at the list of binary packages available for your version of R and installs the latest versions (if any). 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 <code>make</code> is available.</p>
<p>Note that most binary packages which include compiled code are tied to a particular series (e.g.&nbsp;R 4.5.x or 4.4.x) of R.</p>
<p>Installing source packages which do not contain compiled code should work with no additional tools. For others you will need the ‘Command Line Tools’ for <code>Xcode</code> and compilers which match those used to build R, plus a Fortran compiler for packages which contain Fortran code: see <a href="Platform-notes.html#macos">macOS</a>. Packages with C/C++ source code which link to Fortran libraries (which include the BLAS and LAPACK libraries) will need either the Fortran compiler or, for CRAN binary distributions of R, to specify</p>
Expand Down Expand Up @@ -531,8 +531,7 @@ <h2 class="section anchored" data-number="6.6" data-anchor-id="setting-up-a-pack
<p>Utilities such as <code>install.packages</code> can be pointed at any CRAN-style repository, and R users may want to set up their own. The ‘base’ of a repository is a URL such as <a href="https://www.stats.ox.ac.uk/pub/RWin/" class="uri">https://www.stats.ox.ac.uk/pub/RWin/</a>: this must be an URL scheme that <code>download.packages</code> supports (which also includes <code>https://</code>, <code>ftp://</code> and <code>file://</code>). Under that base URL there should be directory trees for one or more of the following types of package distributions:</p>
<ul>
<li><code>"source"</code>: located at <code>src/contrib</code> and containing <code>.tar.gz</code> files. Other forms of compression can be used, e.g.&nbsp;<code>.tar.bz2</code> or <code>.tar.xz</code> files. Complete repositories contain the sources corresponding to any binary packages, and in any case it is wise to have a <code>src/contrib</code> area with a possibly empty <code>PACKAGES</code> file.</li>
<li><code>"win.binary"</code>: located at <code>bin/windows/contrib/x.y</code> for R versions <code>x.y.z</code> and containing <code>.zip</code> files for Windows.</li>
<li><code>"mac.binary"</code>: located at <code>bin/macosx/big-sur-arm64/contrib/4.y</code> or <code>bin/macosx/big-sur-x86_64/contrib/4.y</code> for the CRAN builds for macOS for R versions <code>4.y.z</code>, containing <code>.tgz</code> files. (<code>bin/macosx/contrib/4.y</code> for <code>y</code> = 0, 1 or 2.)</li>
<li><code>"binary"</code>: binary packages are located under <code>bin/os/build/contrib/x.y</code> for R versions <code>x.y.z</code>, where <code>os</code> is either <code>windows</code> for Windows or <code>macosx</code> for macOS and OS X. The <code>build</code> variable is defined by the third part of the <code>type</code> value after <code>binary</code> and may be empty. For example, in R 4.4.1 <code>"mac.binary.big-sur-arm64"</code> specifies the <code>bin/macosx/big-sur-arm64/4.4</code> location, while <code>"win.binary"</code> specifies <code>bin/windows/contrib/4.4</code>. The platform and build specification in CRAN R binaries can be obtained from <code>.Platform$pkgType</code>. Windows binary package files use <code>.zip</code> extension while Mac files use <code>.tgz</code>.</li>
</ul>
<p>Each terminal directory must also contain a <code>PACKAGES</code> file. This can be a concatenation of the <code>DESCRIPTION</code> files of the packages separated by blank lines, but only a few of the fields are needed. The simplest way to set up such a file is to use function <code>write_PACKAGES</code> in the <strong>tools</strong> package, and its help explains which fields are needed. Optionally there can also be <code>PACKAGES.rds</code> and <code>PACKAGES.gz</code> files, downloaded in preference to <code>PACKAGES</code>. (If you have a mis-configured server that does not report correctly non-existent files you may need these files.)</p>
<p>To add your repository to the list offered by <code>setRepositories()</code>, see the help file for that function.</p>
Expand Down
Loading

0 comments on commit 277b3cf

Please sign in to comment.