MEssage

library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.0 --
## v ggplot2 3.3.2     v purrr   0.3.4
## v tibble  3.0.3     v dplyr   1.0.2
## v tidyr   1.1.2     v stringr 1.4.0
## v readr   1.4.0     v forcats 0.5.0
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()

Bibliographies

Recuperation élément

moy <- mean(iris$Sepal.Length)
moy <- round(moy,2)

LA moyenne des longueurs de sépales est égale 5.84.

Les tables

library(DT)
## Warning: package 'DT' was built under R version 4.0.3
library(funModeling)
## Loading required package: Hmisc
## Loading required package: lattice
## Loading required package: survival
## Loading required package: Formula
## 
## Attaching package: 'Hmisc'
## The following objects are masked from 'package:dplyr':
## 
##     src, summarize
## The following objects are masked from 'package:base':
## 
##     format.pval, units
## funModeling v.1.9.4 :)
## Examples and tutorials at livebook.datascienceheroes.com
##  / Now in Spanish: librovivodecienciadedatos.ai
datatable(heart_disease,options = list( pageLength=10, scrollX='400px'))

Images

Lien html

l’adresse de youtube est https://youtube.com

LA vidéo est sur youtube

library(knitr)

1.Gestion des tables

head(iris)
##   Sepal.Length Sepal.Width Petal.Length Petal.Width Species
## 1          5.1         3.5          1.4         0.2  setosa
## 2          4.9         3.0          1.4         0.2  setosa
## 3          4.7         3.2          1.3         0.2  setosa
## 4          4.6         3.1          1.5         0.2  setosa
## 5          5.0         3.6          1.4         0.2  setosa
## 6          5.4         3.9          1.7         0.4  setosa
library(knitr)
kable(head(iris))
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
5.1 3.5 1.4 0.2 setosa
4.9 3.0 1.4 0.2 setosa
4.7 3.2 1.3 0.2 setosa
4.6 3.1 1.5 0.2 setosa
5.0 3.6 1.4 0.2 setosa
5.4 3.9 1.7 0.4 setosa
mod1 <- lm(Sepal.Length~Sepal.Width, data=iris)
coefficients(summary(mod1))
##               Estimate Std. Error   t value     Pr(>|t|)
## (Intercept)  6.5262226  0.4788963 13.627631 6.469702e-28
## Sepal.Width -0.2233611  0.1550809 -1.440287 1.518983e-01
kable(coefficients(summary(mod1)),digits=3, caption="Résultats") 
Résultats
Estimate Std. Error t value Pr(>|t|)
(Intercept) 6.526 0.479 13.628 0.000
Sepal.Width -0.223 0.155 -1.440 0.152

2.Gestion des graphs

library(ggplot2)
ggplot(iris, aes(x=Sepal.Width, y=Sepal.Length))+
    geom_point()

library(ggplot2)
ggplot(iris, aes(x=Sepal.Width, y=Sepal.Length))+
    geom_point()

library(ggplot2)
ggplot(iris, aes(x=Sepal.Width, y=Sepal.Length))+
    geom_point()

3.Gestion parties code

3.1 Code et sorties affichés

head(iris,3)
##   Sepal.Length Sepal.Width Petal.Length Petal.Width Species
## 1          5.1         3.5          1.4         0.2  setosa
## 2          4.9         3.0          1.4         0.2  setosa
## 3          4.7         3.2          1.3         0.2  setosa

3.2 Uniquement le code affiché

head(iris,3)

3.3 Uniquement le résultat affiché

##   Sepal.Length Sepal.Width Petal.Length Petal.Width Species
## 1          5.1         3.5          1.4         0.2  setosa
## 2          4.9         3.0          1.4         0.2  setosa
## 3          4.7         3.2          1.3         0.2  setosa

3.4 Ni code ni resultats affichés

Pas d’execution du chunk

Eléments de texte

Formatage

Je peux écrire tous les textes.

Je peux écrire tous les textes.

Je peux écrire tous les textes.

Je peux écrire touts les textes.

Je peux écrire tous les textes.
Je peux écrire tous les textes.

Gestion des titres et listes puces

Titres

Listes

Liste des courses :

  • salade
    • laitue
    • chou
  • tomates
  • fromage

Liste numérotées

Tâches à faire :

  1. ne pas lire ces mail
  2. ouvrir netflix
  3. couper son téléphone

Global options

options(max.print=“75”) opts_chunk\(set(echo=FALSE, cache=TRUE, prompt=FALSE, tidy=TRUE, comment=NA, message=FALSE, warning=FALSE) opts_knit\)set(width=75) ```