@@ -283,7 +283,7 @@ <h2>R, les assignations</h2>
283
283
< h2 > R, les fonctions</ h2 >
284
284
< p > Les fonctions sont très importantes dans R. C’est elles qui effectuent tous vos calculs. Pour appeler une fonction, on utilise son nom suivi d’une parenthèse, et éventuellement un ou plusieurs arguments fournis à l’intérieur de la parenthèse et séparés par une virgule < code > fun_name(arg1, arg2, ...)</ code > . Voici un exemple d’une fonction appelée sans argument :</ p >
285
285
< pre class ="r "> < code > Sys.Date()</ code > </ pre >
286
- < pre > < code > [1] "2019-08-22 "</ code > </ pre >
286
+ < pre > < code > [1] "2019-08-23 "</ code > </ pre >
287
287
< p > Une autre fonction appelée avec un seul argument :</ p >
288
288
< pre class ="r "> < code > x <- 1:4
289
289
sum(x)</ code > </ pre >
@@ -374,7 +374,7 @@ <h2>Imbrication et chaînage</h2>
374
374
< p > Mais dans ce dernier cas, la lecture devient plus difficile. On peut aussi < strong > chaîner</ strong > des instructions avec l’opérateur < code > %>.%</ code > dans la version < code > SciViews::R</ code > qui charge des “packages” supplémentaires pour fournir des fonctions en plus de R de base :</ p >
375
375
< pre class ="r "> < code > # Installer SciViews::R
376
376
SciViews::R</ code > </ pre >
377
- < pre > < code > ── Attaching packages ────────────────────────────────────────── SciViews::R 1.1.0 ──</ code > </ pre >
377
+ < pre > < code > ── Attaching packages ──────────────────────────────────────────────────────────────────────────────────────────── SciViews::R 1.1.0 ──</ code > </ pre >
378
378
< pre > < code > ✔ SciViews 1.1.0 ✔ purrr 0.3.2
379
379
✔ chart 1.3.0 ✔ readr 1.3.1
380
380
✔ flow 1.0.0 ✔ tidyr 0.8.3
@@ -383,7 +383,7 @@ <h2>Imbrication et chaînage</h2>
383
383
✔ forcats 0.4.0 ✔ tidyverse 1.2.1
384
384
✔ stringr 1.4.0 ✔ lattice 0.20.38
385
385
✔ dplyr 0.8.0.1 ✔ MASS 7.3.51.3</ code > </ pre >
386
- < pre > < code > ── Conflicts ─────────────────────────────────────────────── tidyverse_conflicts() ──
386
+ < pre > < code > ── Conflicts ───────────────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
387
387
✖ dplyr::filter() masks stats::filter()
388
388
✖ dplyr::lag() masks stats::lag()
389
389
✖ dplyr::select() masks MASS::select()</ code > </ pre >
@@ -532,7 +532,7 @@ <h2>Conclusion</h2>
532
532
<!--/html_preserve-->
533
533
<!--html_preserve-->
534
534
< script type ="application/shiny-prerendered " data-context ="execution_dependencies ">
535
- { "type" :"list" , "attributes" :{ "names" :{ "type" :"character" , "attributes" :{ } , "value" :[ "packages" ] } } , "value" :[ { "type" :"list" , "attributes" :{ "names" :{ "type" :"character" , "attributes" :{ } , "value" :[ "packages" , "version" ] } , "class" :{ "type" :"character" , "attributes" :{ } , "value" :[ "data.frame" ] } , "row.names" :{ "type" :"integer" , "attributes" :{ } , "value" :[ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , 26 , 27 , 28 , 29 , 30 , 31 , 32 , 33 , 34 , 35 , 36 , 37 , 38 , 39 , 40 , 41 , 42 , 43 , 44 , 45 , 46 , 47 , 48 , 49 , 50 , 51 , 52 , 53 , 54 , 55 , 56 , 57 , 58 , 59 , 60 , 61 , 62 , 63 , 64 , 65 , 66 , 67 , 68 , 69 , 70 , 71 , 72 , 73 , 74 , 75 , 76 , 77 , 78 , 79 , 80 , 81 , 82 , 83 , 84 , 85 , 86 , 87 , 88 , 89 , 90 , 91 , 92 , 93 , 94 , 95 , 96 , 97 , 98 , 99 , 100 , 101 , 102 , 103 , 104 , 105 , 106 , 107 , 108 , 109 , 110 , 111 ] } } , "value" :[ { "type" :"character" , "attributes" :{ } , "value" :[ "acepack" , "assertthat" , "backports" , "base" , "base64enc" , "BioDataScience" , "broom" , "cellranger" , "chart" , "checkmate" , "cli" , "cluster" , "codetools" , "colorspace" , "compiler" , "cowplot" , "crayon" , "data.io" , "data.table" , "datasets" , "digest" , "dplyr" , "ellipse" , "evaluate" , "flow" , "forcats" , "foreign" , "Formula" , "generics" , "ggplot2" , "ggplotify" , "ggpubr" , "glue" , "graphics" , "grDevices" , "grid" , "gridExtra" , "gridGraphics" , "gtable" , "haven" , "Hmisc" , "hms" , "htmlTable" , "htmltools" , "htmlwidgets" , "httpuv" , "httr" , "igraph" , "inline" , "jsonlite" , "knitr" , "later" , "lattice" , "latticeExtra" , "lazyeval" , "learnr" , "lubridate" , "magrittr" , "markdown" , "MASS" , "Matrix" , "methods" , "mime" , "modelr" , "mongolite" , "munsell" , "nlme" , "nnet" , "pillar" , "pkgconfig" , "plyr" , "promises" , "proto" , "pryr" , "purrr" , "R6" , "RColorBrewer" , "Rcpp" , "readr" , "readxl" , "remotes" , "rlang" , "rmarkdown" , "rpart" , "rprojroot" , "rstudioapi" , "rvcheck" , "rvest" , "scales" , "SciViews" , "shiny" , "splines" , "stats" , "stringi" , "stringr" , "survival" , "svMisc" , "tibble" , "tidyr" , "tidyselect" , "tidyverse" , "tools" , "tsibble" , "utils" , "viridis" , "viridisLite" , "withr" , "xfun" , "xml2" , "xtable" , "yaml" ] } , { "type" :"character" , "attributes" :{ } , "value" :[ "1.4.1" , "0.2.1" , "1.1.3" , "3.5.3" , "0.1-3" , "0.23.1" , "0.5.2" , "1.1.0" , "1.3.0" , "1.9.1" , "1.1.0" , "2.0.8" , "0.2-16" , "1.4-1" , "3.5.3" , "0.9.4" , "1.3.4" , "1.2.2" , "1.12.2" , "3.5.3" , "0.6.18" , "0.8.0.1" , "0.4.1" , "0.13" , "1.0.0" , "0.4.0" , "0.8-71" , "1.2-3" , "0.0.2" , "3.1.1" , "0.0.3" , "0.2" , "1.3.1" , "3.5.3" , "3.5.3" , "3.5.3" , "2.3" , "0.3-0" , "0.3.0" , "2.1.0" , "4.2-0" , "0.4.2" , "1.13.1" , "0.3.6" , "1.3" , "1.5.1" , "1.4.0" , "1.2.4" , "0.3.15" , "1.6" , "1.22" , "0.8.0" , "0.20-38" , "0.6-28" , "0.2.2" , "0.9.2.1" , "1.7.4" , "1.5" , "0.9" , "7.3-51.3" , "1.2-17" , "3.5.3" , "0.6" , "0.1.4" , "2.0.1" , "0.5.0" , "3.1-138" , "7.3-12" , "1.3.1" , "2.0.2" , "1.8.4" , "1.0.1" , "1.0.0" , "0.1.4" , "0.3.2" , "2.4.0" , "1.1-2" , "1.0.1" , "1.3.1" , "1.3.1" , "2.0.2" , "0.3.4" , "1.12" , "4.1-13" , "1.3-2" , "0.10" , "0.1.3" , "0.3.2" , "1.0.0" , "1.1.0" , "1.3.0" , "3.5.3" , "3.5.3" , "1.4.3" , "1.4.0" , "2.44-1.1" , "1.1.0" , "2.1.1" , "0.8.3" , "0.2.5" , "1.2.1" , "3.5.3" , "0.7.0" , "3.5.3" , "0.5.1" , "0.3.0" , "2.1.2" , "0.6" , "1.2.0" , "1.8-3" , "2.2.0" ] } ] } ] }
535
+ { "type" :"list" , "attributes" :{ "names" :{ "type" :"character" , "attributes" :{ } , "value" :[ "packages" ] } } , "value" :[ { "type" :"list" , "attributes" :{ "names" :{ "type" :"character" , "attributes" :{ } , "value" :[ "packages" , "version" ] } , "class" :{ "type" :"character" , "attributes" :{ } , "value" :[ "data.frame" ] } , "row.names" :{ "type" :"integer" , "attributes" :{ } , "value" :[ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , 26 , 27 , 28 , 29 , 30 , 31 , 32 , 33 , 34 , 35 , 36 , 37 , 38 , 39 , 40 , 41 , 42 , 43 , 44 , 45 , 46 , 47 , 48 , 49 , 50 , 51 , 52 , 53 , 54 , 55 , 56 , 57 , 58 , 59 , 60 , 61 , 62 , 63 , 64 , 65 , 66 , 67 , 68 , 69 , 70 , 71 , 72 , 73 , 74 , 75 , 76 , 77 , 78 , 79 , 80 , 81 , 82 , 83 , 84 , 85 , 86 , 87 , 88 , 89 , 90 , 91 , 92 , 93 , 94 , 95 , 96 , 97 , 98 , 99 , 100 , 101 , 102 , 103 , 104 , 105 , 106 , 107 , 108 , 109 , 110 , 111 ] } } , "value" :[ { "type" :"character" , "attributes" :{ } , "value" :[ "acepack" , "assertthat" , "backports" , "base" , "base64enc" , "BioDataScience" , "broom" , "cellranger" , "chart" , "checkmate" , "cli" , "cluster" , "codetools" , "colorspace" , "compiler" , "cowplot" , "crayon" , "data.io" , "data.table" , "datasets" , "digest" , "dplyr" , "ellipse" , "evaluate" , "flow" , "forcats" , "foreign" , "Formula" , "generics" , "ggplot2" , "ggplotify" , "ggpubr" , "glue" , "graphics" , "grDevices" , "grid" , "gridExtra" , "gridGraphics" , "gtable" , "haven" , "Hmisc" , "hms" , "htmlTable" , "htmltools" , "htmlwidgets" , "httpuv" , "httr" , "igraph" , "inline" , "jsonlite" , "knitr" , "later" , "lattice" , "latticeExtra" , "lazyeval" , "learnr" , "lubridate" , "magrittr" , "markdown" , "MASS" , "Matrix" , "methods" , "mime" , "modelr" , "mongolite" , "munsell" , "nlme" , "nnet" , "pillar" , "pkgconfig" , "plyr" , "promises" , "proto" , "pryr" , "purrr" , "R6" , "RColorBrewer" , "Rcpp" , "readr" , "readxl" , "remotes" , "rlang" , "rmarkdown" , "rpart" , "rprojroot" , "rstudioapi" , "rvcheck" , "rvest" , "scales" , "SciViews" , "shiny" , "splines" , "stats" , "stringi" , "stringr" , "survival" , "svMisc" , "tibble" , "tidyr" , "tidyselect" , "tidyverse" , "tools" , "tsibble" , "utils" , "viridis" , "viridisLite" , "withr" , "xfun" , "xml2" , "xtable" , "yaml" ] } , { "type" :"character" , "attributes" :{ } , "value" :[ "1.4.1" , "0.2.1" , "1.1.3" , "3.5.3" , "0.1-3" , "0.25.0" , "0.5.2" , "1.1.0" , "1.3.0" , "1.9.1" , "1.1.0" , "2.0.8" , "0.2-16" , "1.4-1" , "3.5.3" , "0.9.4" , "1.3.4" , "1.2.2" , "1.12.2" , "3.5.3" , "0.6.18" , "0.8.0.1" , "0.4.1" , "0.13" , "1.0.0" , "0.4.0" , "0.8-71" , "1.2-3" , "0.0.2" , "3.1.1" , "0.0.3" , "0.2" , "1.3.1" , "3.5.3" , "3.5.3" , "3.5.3" , "2.3" , "0.3-0" , "0.3.0" , "2.1.0" , "4.2-0" , "0.4.2" , "1.13.1" , "0.3.6" , "1.3" , "1.5.1" , "1.4.0" , "1.2.4" , "0.3.15" , "1.6" , "1.22" , "0.8.0" , "0.20-38" , "0.6-28" , "0.2.2" , "0.9.2.1" , "1.7.4" , "1.5" , "0.9" , "7.3-51.3" , "1.2-17" , "3.5.3" , "0.6" , "0.1.4" , "2.0.1" , "0.5.0" , "3.1-138" , "7.3-12" , "1.3.1" , "2.0.2" , "1.8.4" , "1.0.1" , "1.0.0" , "0.1.4" , "0.3.2" , "2.4.0" , "1.1-2" , "1.0.1" , "1.3.1" , "1.3.1" , "2.0.2" , "0.3.4" , "1.12" , "4.1-13" , "1.3-2" , "0.10" , "0.1.3" , "0.3.2" , "1.0.0" , "1.1.0" , "1.3.0" , "3.5.3" , "3.5.3" , "1.4.3" , "1.4.0" , "2.44-1.1" , "1.1.0" , "2.1.1" , "0.8.3" , "0.2.5" , "1.2.1" , "3.5.3" , "0.7.0" , "3.5.3" , "0.5.1" , "0.3.0" , "2.1.2" , "0.6" , "1.2.0" , "1.8-3" , "2.2.0" ] } ] } ] }
536
536
</ script >
537
537
<!--/html_preserve--> </ li >
538
538
</ ul >
0 commit comments