Skip to content

Commit c2f1072

Browse files
committed
removed references to MLS functionality and DDL except where necessary
1 parent 5d9323e commit c2f1072

7 files changed

Lines changed: 98 additions & 180 deletions

docs/advanced-analytics/r/create-a-local-package-repository-using-minicran.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The [miniCRAN](https://cran.r-project.org/web/packages/miniCRAN/index.html) pac
2626
+ Analyzing package dependencies for a single package or set of packages
2727
+ Preparing a set of R packages for installation onto a server without internet access.
2828

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+
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.
3030

3131
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.
3232

@@ -41,13 +41,13 @@ The [miniCRAN](https://cran.r-project.org/web/packages/miniCRAN/index.html) pack
4141

4242
Package repositories are useful in these scenarios:
4343

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.
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.
4545

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.
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.
4747

48-
- **Improved version management**: In a multiuser environment, there are good reasons to avoid unrestricted installation of multiple package versions on the server.
48+
- **Improved version management**: In a multiuser environment, there are good reasons to avoid unrestricted installation of multiple package versions on the server.
4949

50-
By using miniCRAN, you can avoid package dependency errors when using the CREATE EXTERNAL LIBRARY statement.
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.
5151

5252
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/)
5353

@@ -135,12 +135,6 @@ You begin by creating a **miniCRAN** repository to use as a source. You should c
135135

136136
After you have created the repository and added the packages you need, you must move the package repository to the server computer, and ensure that the R packages are installed in the correct library for use from SQL Server.
137137

138-
Depending on the version of SQL Server, there are two options for adding new packages to the R library associated with the SQL Server instance:
139-
140-
- Install to the instance library using the miniCRAN repository and R tools.
141-
142-
- Upload packages to a location on the SQL Server computer, and install using the CREATE EXTERNAL LIBRARY statement. This option requires SQL Server 2017.
143-
144138
The following procedure describes how to install the packages using R tools.
145139

146140
1. Copy the folder containing the miniCRAN repository, in its entirety, to the server where you plan to install the packages.
@@ -155,7 +149,7 @@ The following procedure describes how to install the packages using R tools.
155149

156150
- If you have installed SQL Server to a different drive, or made any other changes in the installation path, be sure to make those changes as well.
157151

158-
3. Get the path for the instance library, and add it to the list of library paths.
152+
3. Get the path for the instance library, and add it to the list of library paths.
159153

160154
```R
161155
.libPaths()[1]
@@ -164,27 +158,27 @@ The following procedure describes how to install the packages using R tools.
164158

165159
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 "
166160

167-
4. Specify the location on the server where you copied the **miniCRAN** repository in `server_repo`.
161+
4. Specify the location on the server where you copied the **miniCRAN** repository in `server_repo`.
168162

169163
In this example, we assume that you copied the repository to your user folder on the server.
170164

171165
```R
172166
R server_repo <- "C:\\Users\\MyUserName\\miniCRAN"
173167
```
174168

175-
5. Since you are working in a new R workspace on the server, you must also furnish the list of packages to install.
169+
5. Since you are working in a new R workspace on the server, you must also furnish the list of packages to install.
176170

177171
```R
178172
tspackages <- c("zoo", "forecast")
179173
```
180174

181-
6. Install the packages, providing the path to the local copy of the miniCRAN repo.
175+
6. Install the packages, providing the path to the local copy of the miniCRAN repo.
182176

183177
```R
184178
install.packages(tspackages, repos = file.path("file://", normalizePath(server_repo, winslash = "/")), lib = lib, type = "win.binary", dependencies = TRUE)
185179
```
186180

187-
7. From the instance library, you can view the installed packages using a command like the following:
181+
7. From the instance library, you can view the installed packages using a command like the following:
188182

189183
```R
190184
installed.packages()
@@ -205,4 +199,4 @@ After downloading the packages, you install the R packages from the zipped file
205199

206200
3. Install the packages into the SQL Server instance library using conventional R commands. If the package has dependencies that are not already installed, and you have not included them, installation might fail.
207201

208-
You can also upload individual packages into an instance of SQL Server 2017, by using the CREATE EXTERNAL LIBRARY statement. This feature requires some additional steps to prepare the server. For example, a script must be run to create database roles on the instance and on specific databases. If the package library is successfully created, you must then install the package into the R environment by calling install.packages from sp_execute_external_script. For more information, see these resources:
202+
You can also upload individual packages into an instance of SQL Server 2017, by using the [CREATE EXTERNAL LIBRARY statement](https://docs.microsoft.com/sql/t-sql/statements/create-external-library-transact-sql). This process also required administrative access.

0 commit comments

Comments
 (0)