%-% {shipunov} | R Documentation |
Minus names
Description
Subtract names from names
Usage
x %-% y
Arguments
x |
Character vector (likely named) to subtract from |
y |
Subtracting character vector |
Details
Instead of 'x', the function uses 'names(x)'. If 'x' has no names, they will be assigned from values.
Value
Character vector
Author(s)
Alexey Shipunov
Examples
str(iris[, iris %-% "Species"])
str(iris[, !names(iris) %in% "Species"]) # this is how to make it without %-%
c("apples", "bananas") %-% "apples" # simple character string also works
[Package shipunov version 1.17.1 Index]