Skip to content

Commit abc1ebb

Browse files
author
stonebig
committed
tweak_r
1 parent 97ac59a commit abc1ebb

File tree

2 files changed

+106
-58
lines changed

2 files changed

+106
-58
lines changed

docs/installing_R.ipynb

Lines changed: 53 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
},
4141
{
4242
"cell_type": "code",
43-
"execution_count": 4,
43+
"execution_count": 3,
4444
"metadata": {
4545
"collapsed": false
4646
},
@@ -75,7 +75,7 @@
7575
},
7676
{
7777
"cell_type": "code",
78-
"execution_count": 5,
78+
"execution_count": 4,
7979
"metadata": {
8080
"collapsed": false
8181
},
@@ -87,11 +87,11 @@
8787
" Le volume dans le lecteur D s'appelle DATA\n",
8888
" Le num‚ro de s‚rie du volume est 10BD-2ADB\n",
8989
"\n",
90-
" R‚pertoire de D:\\WinPython\\basedir34\\build\\winpython-3.4.4.amd64\\tools\n",
90+
" R‚pertoire de D:\\result_tests\\winpython-3.5.1.amd64\\tools\n",
9191
"\n",
92-
"01/01/2016 16:11 65ÿ380ÿ480 R-3.2.3-win.exe\n",
92+
"03/01/2016 12:19 65ÿ380ÿ480 R-3.2.3-win.exe\n",
9393
" 1 fichier(s) 65ÿ380ÿ480 octets\n",
94-
" 0 R‚p(s) 134ÿ347ÿ685ÿ888 octets libres\n"
94+
" 0 R‚p(s) 133ÿ833ÿ940ÿ992 octets libres\n"
9595
]
9696
}
9797
],
@@ -102,7 +102,7 @@
102102
},
103103
{
104104
"cell_type": "code",
105-
"execution_count": 6,
105+
"execution_count": 5,
106106
"metadata": {
107107
"collapsed": false
108108
},
@@ -113,7 +113,7 @@
113113
"text": [
114114
" MD5 SHA-1 \n",
115115
"-------------------------------- ----------------------------------------\n",
116-
"5572ce407831ce9156485d4f896ad616 b86077268e4aa5498482f4514202009009ddf947 D:\\WinPython\\basedir34\\build\\winpython-3.4.4.amd64\\python-3.4.4.amd64\\..\\tools\\R-3.2.3-win.exe\n"
116+
"5572ce407831ce9156485d4f896ad616 b86077268e4aa5498482f4514202009009ddf947 D:\\result_tests\\winpython-3.5.1.amd64\\python-3.5.1.amd64\\..\\tools\\R-3.2.3-win.exe\n"
117117
]
118118
}
119119
],
@@ -132,7 +132,7 @@
132132
},
133133
{
134134
"cell_type": "code",
135-
"execution_count": 7,
135+
"execution_count": 6,
136136
"metadata": {
137137
"collapsed": false
138138
},
@@ -175,7 +175,7 @@
175175
},
176176
{
177177
"cell_type": "code",
178-
"execution_count": 12,
178+
"execution_count": 7,
179179
"metadata": {
180180
"collapsed": false
181181
},
@@ -195,8 +195,11 @@
195195
"# let's create a R init script\n",
196196
"# in manual command line, you can use repos = c('http://irkernel.github.io/', getOption('repos'))\n",
197197
"r_initialization = r\"\"\"\n",
198-
"install.packages(c('rzmq','repr','IRkernel','IRdisplay'), repos = c('http://irkernel.github.io/', repos=\"http://cran.rstudio.com/\"))\n",
199-
"library('rzmq');library('repr');library('IRkernel');library('IRdisplay')\n",
198+
"install.packages(c('rzmq','repr','IRkernel','IRdisplay'), repos = c('http://irkernel.github.io/', repos='http://cran.rstudio.com/'))\n",
199+
"library('rzmq')\n",
200+
"library('repr')\n",
201+
"library('IRkernel')\n",
202+
"library('IRdisplay')\n",
200203
"IRkernel::installspec()\n",
201204
"\"\"\"\n",
202205
"r_initialization_r = os.path.normpath(os.environ[\"WINPYDIR\"]+\"\\\\..\\\\scripts\\\\R_initialization.r\")\n",
@@ -210,7 +213,7 @@
210213
},
211214
{
212215
"cell_type": "code",
213-
"execution_count": 13,
216+
"execution_count": 8,
214217
"metadata": {
215218
"collapsed": false
216219
},
@@ -223,7 +226,7 @@
223226
},
224227
{
225228
"cell_type": "code",
226-
"execution_count": 17,
229+
"execution_count": 9,
227230
"metadata": {
228231
"collapsed": false
229232
},
@@ -232,8 +235,7 @@
232235
"name": "stdout",
233236
"output_type": "stream",
234237
"text": [
235-
"patching D:\\WinPython\\basedir34\\build\\winpython-3.4.4.amd64\\settings\\kernels\\ir\\kernel.json from D:/WinPython/basedir34/build/winpython-3.4.4.amd64 to {prefix}/..\n",
236-
"None\n"
238+
"patching D:\\result_tests\\winpython-3.5.1.amd64\\settings\\kernels\\ir\\kernel.json from D:/result_tests/winpython-3.5.1.amd64 to {prefix}/..\n"
237239
]
238240
}
239241
],
@@ -258,7 +260,7 @@
258260
},
259261
{
260262
"cell_type": "code",
261-
"execution_count": 18,
263+
"execution_count": 10,
262264
"metadata": {
263265
"collapsed": false
264266
},
@@ -268,10 +270,7 @@
268270
"\n",
269271
"#vitals: 'dplyr', 'R.utils', 'nycflights13'\n",
270272
"# installation takes 2 minutes\n",
271-
"%R install.packages(c('dplyr','R.utils', 'nycflights13'), repos='http://cran.rstudio.com/') \n",
272-
"\n",
273-
"# essentials: 'tidyr', 'shiny', 'ggplot2', 'caret' , 'nnet' \n",
274-
"#%R install.packages(c('tidyr', 'ggplot2', 'shiny','caret' , 'nnet'), repos='https://cran.rstudio.com/') \n"
273+
"%R install.packages(c('dplyr','R.utils', 'nycflights13'), repos='http://cran.rstudio.com/') "
275274
]
276275
},
277276
{
@@ -283,7 +282,7 @@
283282
},
284283
{
285284
"cell_type": "code",
286-
"execution_count": 20,
285+
"execution_count": 11,
287286
"metadata": {
288287
"collapsed": false
289288
},
@@ -303,20 +302,21 @@
303302
},
304303
{
305304
"cell_type": "code",
306-
"execution_count": 21,
305+
"execution_count": 12,
307306
"metadata": {
308307
"collapsed": false
309308
},
310309
"outputs": [],
311310
"source": [
312311
"%%R\n",
313312
"library('dplyr')\n",
314-
"library('nycflights13') "
313+
"library('nycflights13') \n",
314+
"write.csv(flights, \"flights.csv\")"
315315
]
316316
},
317317
{
318318
"cell_type": "code",
319-
"execution_count": 22,
319+
"execution_count": 13,
320320
"metadata": {
321321
"collapsed": false
322322
},
@@ -484,7 +484,7 @@
484484
"6 1696 EWR ORD 150 719 5 54 "
485485
]
486486
},
487-
"execution_count": 22,
487+
"execution_count": 13,
488488
"metadata": {},
489489
"output_type": "execute_result"
490490
}
@@ -495,7 +495,7 @@
495495
},
496496
{
497497
"cell_type": "code",
498-
"execution_count": 23,
498+
"execution_count": 14,
499499
"metadata": {
500500
"collapsed": false
501501
},
@@ -607,7 +607,7 @@
607607
"6 IAD "
608608
]
609609
},
610-
"execution_count": 23,
610+
"execution_count": 14,
611611
"metadata": {},
612612
"output_type": "execute_result"
613613
}
@@ -620,7 +620,31 @@
620620
"cell_type": "markdown",
621621
"metadata": {},
622622
"source": [
623-
"### 5 - Relaunch Jupyter Notebook to get a R kernel option\n",
623+
"### 5 - Installing the very best of R pakages (optional, you will start to get a really big directory)\n"
624+
]
625+
},
626+
{
627+
"cell_type": "code",
628+
"execution_count": 15,
629+
"metadata": {
630+
"collapsed": true
631+
},
632+
"outputs": [],
633+
"source": [
634+
"# essentials: 'tidyr', 'shiny', 'ggplot2', 'caret' , 'nnet' \n",
635+
"# remaining of Hadley Wickahm \"stack\" (https://github.com/rstudio)\n",
636+
"%R install.packages(c('tidyr', 'ggplot2', 'shiny','caret' , 'nnet'), repos='https://cran.rstudio.com/') \n",
637+
"%R install.packages(c('knitr', 'purrr', 'readr', 'readxl'), repos='https://cran.rstudio.com/')\n",
638+
"%R install.packages(c('rvest', 'lubridate', 'ggvis'), repos='https://cran.rstudio.com/')\n",
639+
"\n",
640+
"# TRAINING = online training book http://r4ds.had.co.nz/ (or https://github.com/hadley/r4ds)"
641+
]
642+
},
643+
{
644+
"cell_type": "markdown",
645+
"metadata": {},
646+
"source": [
647+
"### 6 - Relaunch Jupyter Notebook to get a R kernel option\n",
624648
"launch a new notebook of \"R\" type, and type in it:\n",
625649
" \n",
626650
"library('dplyr')\n",
@@ -669,7 +693,7 @@
669693
"name": "python",
670694
"nbconvert_exporter": "python",
671695
"pygments_lexer": "ipython3",
672-
"version": "3.4.4"
696+
"version": "3.5.1"
673697
}
674698
},
675699
"nbformat": 4,

0 commit comments

Comments
 (0)