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/install-additional-r-packages-on-sql-server.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,13 +59,13 @@ This article describes how to install new R packages to an instance of SQL Serve
59
59
60
60
## Install new packages
61
61
62
-
This section provide detailed procedures for the following key package installation scenarios. The best method for you to use depends on these factores:
62
+
This section provide detailed procedures for key package installation scenarios. Choose the best method, depending on:
63
63
64
64
- The version of SQL Server you are using
65
65
66
-
- Whether you are the sole owner of the instance, or are trying to mamaneg packages for multiple people using database roles.
66
+
- Whether you are the sole owner of the instance, or are trying to manage packages for multiple people using database roles.
67
67
68
-
- Whether you are installing one packages, or multiple packages with dependencies
68
+
- Whether you are installing one package, or multiple packages with dependencies
69
69
70
70
**Use SQL Server package management**
71
71
@@ -83,7 +83,7 @@ If your instance supports package management features, you can use either T-SQL
83
83
84
84
[Install multiple packages from a miniCRAN repository](#bkmk_minicran)
85
85
86
-
**Use conventional R rools**
86
+
**Use conventional R tools**
87
87
88
88
If you are using an earlier version of SQL Server R services, follow these instructions to install packages using conventional R tools. Optionally, use miniCRAN to prepare a collection of packages for installation.
89
89
@@ -103,15 +103,15 @@ If you are using an earlier version of SQL Server R services, follow these instr
103
103
104
104
2. Connect to the server using an account that has permissions to install new packages, using one of the supported database roles described in this topic: [R package management for SQL Server](r-package-management-for-sql-server-r-services.md)
105
105
106
-
3. Copy the zipped file containing the R package you want to install to a folder on the server computer, such as your **Users** or **Documents** folder. You cannot add a package from a networked drive or from a folder on the client computer. If you have used miniCRAN to create a package repository, copy the package repository in its entirety to any local folder on the server: i.e., not on a networked drive.
106
+
3. Copy the zipped file containing the R package you want to install to a folder on the server computer, such as your **Users** or **Documents** folder. You cannot add a package from a networked drive or from a folder on the client computer. If you have used miniCRAN to create a package repository, copy the package repository in its entirety to any local folder on the server: that is, not on a networked drive.
107
107
108
108
If you don't have access to any folders on the server, you can pass the package contents in binary format. See [CREATE EXTERNAL LIBRARY](https://docs.microsoft.com/sql/t-sql/statements/create-external-library-transact-sql) for an example.
109
109
110
110
4. From the database where you want to use the package, run the [CREATE EXTERNAL
For this example, we'll assume that your account has permission to upload new packages to the server and install them to shared scope in the database.
114
+
For this example, we assume that your account has permission to upload new packages to the server and install them to **shared** scope in the database.
115
115
116
116
The following statement adds the release version of the [zoo](https://cran.r-project.org/web/packages/zoo/index.html) package into the current database context, from a local fileshare.
117
117
@@ -135,7 +135,7 @@ If you are using an earlier version of SQL Server R services, follow these instr
135
135
library(zoo)'
136
136
```
137
137
138
-
If successful, the **Messages** window should report a message such as"package 'zoo' successfully unpacked and MD5 sums checked". If a required package is already installed, the installation process will attachandload the required package.
138
+
If successful, the **Messages** window should report a message such as"package 'zoo' successfully unpacked and MD5 sums checked." If a required package is already installed, the installation process then attachesandloads the required package.
139
139
140
140
> [!NOTE]
141
141
> If a required package is not available, an error is returned: "there is no package called \<required_package\>".
@@ -218,7 +218,7 @@ You can use R tools to install new packages on both SQL Server 2016 and SQL Serv
218
218
219
219
When asked for a mirror site, select any site that is convenient for your location.
220
220
221
-
If the target package depends on additional packages, the R installer will automatically download the dependencies andinstall them for you.
221
+
If the target package depends on additional packages, the R installer automatically downloads the dependencies andinstalls them for you.
222
222
223
223
**Install package manually oron a computer with no Internet access**
224
224
@@ -234,7 +234,7 @@ You can use R tools to install new packages on both SQL Server 2016 and SQL Serv
234
234
235
235
### <a name="bkmk_minicran"></a> Install multiple packages from a miniCRAN repository
236
236
237
-
If you are installing packages from a miniCRAN repository, the overall process is very similar to installing a package from a single zipped file. However, rather than uploading an individual package in zipped format, the miniCRAN repository contains the target package as well as any related required packages.
237
+
The overall process of installing packages from a miniCRAN repository is similar to installing a package from a single zipped file. However, rather than uploading an individual package in zipped format, the miniCRAN repository contains the target package as well as any related required packages.
238
238
239
239
1. Prepare the miniCRAN repository and then copy the zipped file to a local folder on the server.
240
240
@@ -258,19 +258,19 @@ If you are installing packages from a miniCRAN repository, the overall process i
258
258
library(randomForest)'
259
259
```
260
260
261
-
If successful, the **Messages** window should report a message such as"package 'randomForest' successfully unpacked and MD5 sums checked"andalso "Finished chained execution".
261
+
If successful, the **Messages** window should report a message such as"package 'randomForest' successfully unpacked and MD5 sums checked"and"Finished chained execution".
262
262
263
263
## Package installation tips
264
264
265
265
This section provides assorted tips and sample code related to R package installation on SQL Server.
266
266
267
267
### <a name="packageVersion"></a> Get the correct package version and format
268
268
269
-
There are multiple sources for R packages, the best known among them being CRAN and Bioconductor. The official site for the R language (<https://www.r-project.org/>) lists many of these resources. Many packages are also published to GitHub, where you can obtain the source code. However, you may also have been given R packages that were developed by someone in your company.
269
+
There are multiple sources for R packages, the best known among them being CRAN and Bioconductor. The official site for the R language (<https://www.r-project.org/>) lists many of these resources. Many packages are published to GitHub, where you can obtain the source code. However, you may have been given R packages that were developed by someone in your company.
270
270
271
271
Regardless of the source, you must ensure that the package you want to install has a binary format for the Windows platform. Otherwise the downloaded package cannot run in the SQL Server environment.
272
272
273
-
You should also determine whether the package is compatible with the version of R that is running in SQL Server.
273
+
Before downloading, you should also check whether the package is compatible with the version of R that is running in SQL Server.
274
274
275
275
### <a name="bkmk_zipPreparation"></a> Download package as zipped file
276
276
@@ -288,7 +288,7 @@ For example, the following procedure describes now to get the correct version of
288
288
289
289
This process creates a local copy of the package. You can then install the package, or copy the zipped package to a server that does not have internet access.
290
290
291
-
For more information about the contents of the zip file format, and how to create an R package, we recommend this tutorial, which you can download in PDF format from the R project site: [Freidrich Leisch: Creating R Packages](http://cran.r-project.org/doc/contrib/Leisch-CreatingPackages.pdf).
291
+
For more information about the contents of the zip file format, and how to create an R package, we recommend this tutorial, which you can download in PDF format from the R project site: [Creating R Packages](http://cran.r-project.org/doc/contrib/Leisch-CreatingPackages.pdf).
292
292
293
293
### <a name="bkmk_packageDependencies"></a> Get package dependencies
0 commit comments