trimmers {invctr} | R Documentation |
Trim vector by index
Description
Trim vector by index
Trim vector front
Trim vector rear
Trim vector front + rear
Usage
x %[-% i
x %-]% i
x %[-]% j
Arguments
x |
A vector |
i |
A 1 element vector by which the rear of |
j |
A one, or two element numeric vector. One element: Trim front by |
Value
A trimmed version of x
Examples
x <- rnorm(100)
# Trim front
x%[-%5
# Trim rear
x%-]%5
# Trim front + rear
x%[-]%c(2,10)
x%[-]%7
[Package invctr version 0.2.0 Index]