From ad6c12e1129234c440ef439014af4aa268993134 Mon Sep 17 00:00:00 2001 From: Carine Rey <carine.rey@ens-lyon.fr> Date: Mon, 10 Oct 2022 10:16:11 +0200 Subject: [PATCH] typo + more explicite example --- session_1/session_1.Rmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/session_1/session_1.Rmd b/session_1/session_1.Rmd index d27fae5..5706d04 100644 --- a/session_1/session_1.Rmd +++ b/session_1/session_1.Rmd @@ -952,7 +952,7 @@ You can use booleans to define which values should be kept. ```{r index2, include=TRUE} x <- c(1,5,7,8,15) x[c(TRUE,FALSE,TRUE,FALSE,TRUE)] -x[c(FALSE,TRUE)] # Bolean vector is reuse if it is not of the same size of the vector to index +x[c(FALSE,TRUE)] # Bolean vector is reused if it is not of the same size of the vector to index y <- c(TRUE,FALSE,FALSE,FALSE,TRUE) x[y] @@ -972,7 +972,7 @@ x <- c(1,5,7,8,15) x[1] <- 3 x -x[x>5] <- 5 +x[x>5] <- 13 x ``` -- GitLab