I don't understand the use of exclamatory signs here.
x <- [!x %in% boxplot(x)$out]
I don't understand the use of exclamatory signs here.
x <- [!x %in% boxplot(x)$out]
!
is nothing more than just a negation.
You should start from %in%
if the example you gave is problematic for you.
vector1 <- c("a", "b")
vector2 <- c("c", "a")
vector1 %in% vector2 # for each element of vector1 do: is it in vector2?
#> [1] TRUE FALSE
if you use !
now, i.e. negate the output, you will get:
!vector1 %in% vector2
#> [1] FALSE TRUE