You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two ways that you can prepare R packages for installation onto a server without internet access.
24
+
The [miniCRAN](https://cran.r-project.org/web/packages/miniCRAN/index.html) package was created by Andre de Vries to support these common scenarios:
25
25
26
-
-[Use the miniCRAN package to create a single local repository](#bkmk_miniCRAN)
26
+
+ Analyzing package dependencies for a single package or set of packages
27
+
+ Preparing a set of R packages for installation onto a server without internet access.
27
28
28
-
The [miniCRAN](https://cran.r-project.org/web/packages/miniCRAN/index.html) creates an internally consistent repository consisting of selected packages from CRAN-like repositories. The user specifies a set of desired packages, and miniCRAN recursively reads the dependency tree for these packages, and downloads only the listed packages and their dependencies.
29
+
The user specifies a set of desired packages, and miniCRAN recursively reads the dependency tree for these packages, and downloads only the listed packages and their dependencies from CRAN or similar repositories.
29
30
30
-
You can then move this local repository to the server, and proceed to install the packages without using the internet.
31
+
As an output, miniCRAN creates an internally consistent repository consisting of the selected packages and all required dependencies. You can then move this local repository to the server, and proceed to install the packages without using the internet.
31
32
32
-
-[Manually download and copy packages one by one](#bkmk_manual)
33
+
Experienced R users often look for the list of dependent packages in the DESCRIPTION file for the downloaded package. However, packages listed in **Imports** might have second-level dependencies. For this reason, we recommend use of the **miniCRAN** method.
33
34
34
-
You can find the list of dependent packages in the DESCRIPTION file for the downloaded package.
35
-
36
-
However, packages listed in **Imports** might have second-level dependencies. For this reason, we recommend use of the **miniCRAN** method.
37
-
38
-
> [!TIP]
39
-
> Did you know that you can use miniCRAN to prepare packages for use in Azure Machine Learning? For more information, see this blog: [Using miniCRAN in Azure ML, by Michele Usuelli](https://www.r-bloggers.com/using-minicran-in-azure-ml/)
40
35
41
-
## Prepare packages using miniCRAN
36
+
## What is a package repository
42
37
43
-
The goal of creating a local package repository is to provide a single location that a server administrator or other users in the organization can use to install new R packages on a server that does not have internet access.
38
+
The goal of creating a local package repository is to provide a single location that a server administrator or other users in the organization can use to install new R packages on a server that does not have internet access. After creating the repository, you can modify it by adding new packages or upgrading the version of existing packages.
44
39
45
40
The [miniCRAN](https://cran.r-project.org/web/packages/miniCRAN/index.html) package for R was written by [Andre de Vries](http://blog.revolutionanalytics.com/2016/05/minicran-sql-server.html) to make it easier to create a consistent, managed set of R packages for an organization.
46
41
47
-
There are many advantages to using miniCRAN to create the repository:
42
+
Package repositories are useful in these scenarios:
48
43
49
44
-**Security**: Many R users are accustomed to downloading and installing new R packages at will, from CRAN or one of its mirror sites. However, for security reasons, production servers running [!INCLUDE[ssNoVersion_md](..\..\includes\ssnoversion-md.md)] typically do not have internet connectivity.
50
45
51
46
-**Easier offline installation**: To install package to an offline server requires that you also download all package dependencies, Using miniCRAN makes it easier to get all dependencies in the correct format.
52
47
53
48
-**Improved version management**: In a multiuser environment, there are good reasons to avoid unrestricted installation of multiple package versions on the server.
54
49
55
-
After creating the repository, you can modify it by adding new packages or upgrading the version of existing packages.
50
+
By using miniCRAN, you can avoid package dependency errors when using the CREATE EXTERNAL LIBRARY statement.
51
+
52
+
You can also use miniCRAN to prepare packages for use in Azure Machine Learning. For more information, see this blog: [Using miniCRAN in Azure ML, by Michele Usuelli](https://www.r-bloggers.com/using-minicran-in-azure-ml/)
53
+
54
+
55
+
## Prepare packages using miniCRAN
56
+
57
+
The **miniCRAN** package itself is dependent on 18 other CRAN packages, among which is the **RCurl** package, which has a system dependency on the **curl-devel** package. Similarly, package **XML** has a dependency on **libxml2-devel**.
58
+
59
+
For these reasons, we recommend that you build your local repository initially on a machine with full Internet access, so that you can easily satisfy all these dependencies.
56
60
57
-
> [!NOTE]
58
-
> The miniCRAN package itself is dependent on 18 other CRAN packages, among which is the RCurl package, which has a system dependency on the curl-devel package. Similarly, package XML has a dependency on libxml2-devel. We recommend, therefore, that you build your local repository initially on a machine with full Internet access, so that you can easily satisfy all these dependencies. After created, you can move the repository to a different location.
61
+
After the repository has been created, you can move the repository to a different location.
59
62
60
63
### Step 1. Install the miniCRAN package
61
64
62
-
You begin by creating a miniCRAN repository to use as a source. You should create this repository on a computer that has internet access.
65
+
You begin by creating a **miniCRAN** repository to use as a source. You should create this repository on a computer that has internet access.
63
66
64
-
1. Install the miniCRAN package and the required **igraph** package.
67
+
1. Install the **miniCRAN** package and the required **igraph** package.
Donotadddependenciestothisinitiallist; the**igraph**packageusedbyminiCRANgeneratesthelistofdependenciesforyou.Formoreinformationabouthowtousethegenerateddependencygraph, see [UsingminiCRANtoidentifypackage
98
+
Do**not**adddependenciestothisinitiallist.The**igraph**packageusedby**miniCRAN**generatesthelistofdependenciesforyou.Formoreinformationabouthowtousethegenerateddependencygraph, see [UsingminiCRANtoidentifypackage
0 commit comments