I want to pick elements from a vector and exclude 3 values by what position they got.
I know about the x[-n] function to exclude a single value but I don´t know how to exclude more than one.
You could use the c function to combine the values into a vector:
a <- 1:10
a[-c(1,2,3)]
[1] 4 5 6 7 8 9 10
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With