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
Copy file name to clipboardExpand all lines: docs/advanced-analytics/r/create-a-local-package-repository-using-minicran.md
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,6 @@ As an output, miniCRAN creates an internally consistent repository consisting of
32
32
33
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.
34
34
35
-
36
35
## What is a package repository
37
36
38
37
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.
@@ -45,12 +44,12 @@ Package repositories are useful in these scenarios:
45
44
46
45
-**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.
47
46
48
-
-**Improved version management**: In a multiuser environment, there are good reasons to avoid unrestricted installation of multiple package versions on the server.
49
-
50
-
By using miniCRAN, you can avoid package dependency errors when preparing packages to install with the [CREATE EXTERNAL LIBRARY](https://docs.microsoft.com/sql/t-sql/statements/create-external-library-transact-sql) statement.
47
+
By using miniCRAN, you can avoid package dependency errors when preparing packages to install with the [CREATE EXTERNAL LIBRARY](https://docs.microsoft.com/sql/t-sql/statements/create-external-library-transact-sql) statement.
51
48
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/)
49
+
-**Improved version management**: In a multiuser environment, there are good reasons to avoid unrestricted installation of multiple package versions on the server. Use a local repository to provide a consistent set of packages for use by your analysts.
53
50
51
+
> [!TIP]
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/)
54
53
55
54
## Prepare packages using miniCRAN
56
55
@@ -74,17 +73,18 @@ You begin by creating a **miniCRAN** repository to use as a source. You should c
74
73
75
74
### Step 2. Define a package source: a CRAN mirror, or an MRAN snapshot
Thefoldershouldhaveadescriptivename.Herewe've used "miniCRAN", but if you repeat this often, you should probably use a more descriptive name, such as "miniCRANZooPackages" or "miniCRANMyRPackagev2".
88
88
89
89
```R
90
90
local_repo <- "~/miniCRAN"
@@ -114,8 +114,8 @@ You begin by creating a **miniCRAN** repository to use as a source. You should c
114
114
3. Create the local repo. Be sure to change the R version if necessary
From this information, the miniCRAN package creates the folder structure that you need to copy the packages to the [!INCLUDE[ssNoVersion_md](..\..\includes\ssnoversion-md.md)] later.
@@ -125,9 +125,9 @@ You begin by creating a **miniCRAN** repository to use as a source. You should c
125
125
You can run the following code to list the packages contained in the miniCRAN repository.
1. Copy the folder containing the miniCRAN repository, in its entirety, to the server where you plan to install the packages. The folder typically has this structure: miniCRAN root> -> bin -> windows -> contrib -> version no -> all packages.
141
141
142
142
2. Open an R command prompt using the R tool associated with the instance.
143
143
@@ -152,18 +152,18 @@ The following procedure describes how to install the packages using R tools.
152
152
3. Get the path for the instance library, and add it to the list of library paths.
153
153
154
154
```R
155
-
.libPaths()[1]
156
-
lib\<- .libPaths()[1]
155
+
.libPaths()[1];
156
+
lib <- .libPaths()[1]
157
157
```
158
158
159
159
On SQL Server, this command should return the path of the library associated with the instance, such as: "C:/Program Files/Microsoft SQL Server/MSSQL14.MSSQLSERVER/R_SERVICES/library "
0 commit comments