Date: Thu, 28 Mar 2024 15:45:10 +0000 (UTC) Message-ID: <752060260.17.1711640710290@dd8e2a20274d> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_16_853483223.1711640710290" ------=_Part_16_853483223.1711640710290 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
In R to use a library it must be loaded using the 'library' fun= ction. To be able to load a library it must have been previouly installed.&= nbsp;Boxes with grey background contain code snippets.
The first step to install packages in R is selecting the CRAN (Comprehen= sive R Archive Network) mirror. Mirror selection and package installation c= an be done via R=E2=80=99s menu (Packages/Set CRAN mirror=E2=80=A6 followed= by Packages/install package(s)=E2=80=A6) or programmatically the via the f= unction 'install.packages' (selecting the CRAN mirror using the ar= gument 'repos'). Typically it is best to choose the cloud mirror (= which automatically redirects to an appropriate server worldwide) or a mirr= or close to you (e.g. in your institution, country,..). A list of Comprehen= sive R Archive Network (CRAN) mirror URLs can be found he= re. Bellow are two examples of how to select a CRAN mirrors. In the fir= st example the cloud mirror is selected, and in the second one an Australia= n mirror is selected. Before running this code you must uncomment (i.e. rem= ove the '#' symbol) the line with the desired mirror.
## Select the repository (i.e. CRAN mirror URL)
#my.repos =3D "htt=
ps://cloud.r-project.org/"
#my.repos =3D "htt=
ps://cran.csiro.au/" # Example of an Australian mirror
Currently ausplotsR must be installed directly from github using the =E2=80=98devtools=E2=80=99 package, which must have been previously i= nstalled. The code below installs the 'devtools' package. Rat= her than directly providing the URL for a CRAN mirror, we could have provid= ed the variable 'my.repos' to which we assigned a mirror above.&nb= sp;
## Install directly from github using the 'devtools' pa=
ckage
## Thus, 'devtools=
' must be previouly installed
install.packages("d=
evtools", repos=3D"https://cloud.r-project.org/")
The next steps are to load the 'devetools' library and install = the 'ausplotsR' package from GitHub. The GitHub site for ausp= lotsR contains the latest developments and information on the package; it c= an be found at this link.
library(devtools)
install_github("ter=
naustralia/ausplotsR", build_vignettes =3D TRUE)
Now the 'ausplotsR' library can be loaded
## Load the package
library(aus=
plotsR)