官术网_书友最值得收藏!

Adding R scripts to Jupyter on Windows

The default installation for Anaconda does not include R—I'm not sure why. Once Anaconda is installed, you need to specially install it using the command line. Then, we will take the plunge and add R scripting, which is very similar to what we did for macOS:

conda install -c r notebook r-irkernel 

This produces a detailed view of the packages that are updated. In my case, it installed a full set of R packages and runtimes, even though I had used R elsewhere on the machine earlier:

C:\Users\Dan>conda install -c r notebook r-irkernel
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.4.10
latest version: 4.5.4
Please update conda by running
$ conda update -n base conda
## Package Plan ##
environment location: C:\Users\Dan\Anaconda3
added / updated specs:
- notebook
- r-irkernel
The following packages will be downloaded:
package | build

-------------------|-----------------r-pbdzmq-0.2_6 | mro343h889e2dd_0 4.2 MB r
libxml2-2.9.8 | vc14_0 3.2 MB conda-forge
...
r-stringr-1.2.0 | mro343h889e2dd_0 143 KB r
r-repr-0.12.0 | mro343h889e2dd_0 68 KB r
r-irdisplay-0.4.4 | mro343h889e2dd_0 29 KB r
jpeg-9b | vc14_2 314 KB conda-forge
r-r6-2.2.2 | mro343_0 5.4 MB r
r-digest-0.6.13 | mro343h889e2dd_0 168 KB r
------------------------------------------------------------
Total: 140.2 MB
The following NEW packages will be INSTALLED:
mro-base: 3.4.3-0 r

r-crayon: 1.3.4-mro343h889e2dd_0 r
r-digest: 0.6.13-mro343h889e2dd_0 r
r-evaluate: 0.10.1-mro343h889e2dd_0 r
...
r-stringr: 1.2.0-mro343h889e2dd_0 r
r-uuid: 0.1_2-mro343h889e2dd_0 r
The following packages will be UPDATED:

_r-mutex: 1.0.0-anacondar_1 r --> 1.0.0-mro_2 r
jpeg: 9b-hb83a4c4_2 --> 9b-vc14_2 conda-forge [vc14]
libxml2: 2.9.7-h79bbb47_0 --> 2.9.8-vc14_0 conda-forge [vc14]
sqlite: 3.22.0-h9d3ae62_0 --> 3.22.0-vc14_0 conda-forge [vc14]
r-base: 3.4.3-h6bb4b03_0 r --> 3.4.1-1 conda-forge
Proceed ([y]/n)? y
Downloading and Extracting Packages
r-pbdzmq 0.2_6: ########################################## | 100%
libxml2 2.9.8: ########################################### | 100%
r-irkernel 0.8.11: ####################################### | 100%
r-magrittr 1.5: ########################################## | 100%
r-evaluate 0.10.1: ####################################### | 100%
_r-mutex 1.0.0: ########################################## | 100%
...
r-digest 0.6.13: ########################################################## | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

Now when you start Jupyter and pull down the kernel menu, you will see R as a choice:

 

主站蜘蛛池模板: 溧阳市| 宁武县| 虹口区| 康马县| 建德市| 石家庄市| 保定市| 扎兰屯市| 交口县| 北宁市| 通城县| 石狮市| 甘泉县| 兴安县| 繁峙县| 武邑县| 衢州市| 东乌珠穆沁旗| 镶黄旗| 万安县| 日土县| 思南县| 高陵县| 奉贤区| 沁阳市| 东明县| 陇西县| 蒲江县| 晋中市| 大渡口区| 全椒县| 平顶山市| 托克逊县| 桐庐县| 昌邑市| 绥化市| 凤阳县| 岱山县| 日照市| 鄂伦春自治旗| 平安县|