[R] Exclusion of elements in a vector

Stefan Fritsch fritsch at bips.uni-bremen.de
Thu Sep 25 13:43:48 CEST 2008


Dear R Users,

I want to exclude elements in a vector by:

vector[-exclude]

is it intended to cause an error if no elements are excluded?

> vector <- 1:10
> exclude <- NULL
> vector[-exclude]
Error in -exclude 

or am I just definig exclude wrong, if no elements should be excluded?

with kind regards,

Stefan Fritsch



More information about the R-help mailing list