knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) library(fifa2019demo)
Fonction qui prend en paramètre un vecteur de numérique et renvoit sa moyenne.
library(magrittr) moyenne <- function(x){ x <- x %>% na.omit() sum(x)/length(x) } moyenne(c(4,2,3,4,NA))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.