+ 1

Can anyone who has completed the r course tell me what is wrong with this code?

m <- mean(mtcars$mpg) s <- sd(mtcars$mpg) a <- m+s b <- m-s c <- mtcars[mtcars$mpg<=a || mtcars$mpg>=b,] print(nrow(c))

7th Sep 2021, 1:09 PM
Will
Will - avatar
2 Answers
+ 4
Will There should be & instead of ||
7th Sep 2021, 1:34 PM
A͢J
A͢J - avatar
+ 1
Thanks AJ.
7th Sep 2021, 1:42 PM
Will
Will - avatar