If subset
is an integer vector, each integer must be between 1 and M,
where M the number of spectra in x
.
No duplicates are allowed.
The number of spectra returned is equal to length(subset)
.
It is OK for the length
to be 0, in which case the function returns the empty subset.
If subset
is a logical vector, its length must be equal to M.
The number of spectra returned is equal to the number of TRUE
s in subset
.
If subset
is a regular expression, the number of spectra returned is equal to
the number of specnames(x)
matched by the expression.