grab_index {textshape} | R Documentation |
Get Elements Matching Between 2 Points
Description
Use regexes to get all the elements between two points.
Usage
grab_index(x, from = NULL, to = NULL, ...)
## S3 method for class 'character'
grab_index(x, from = NULL, to = NULL, ...)
## Default S3 method:
grab_index(x, from = NULL, to = NULL, ...)
## S3 method for class 'list'
grab_index(x, from = NULL, to = NULL, ...)
## S3 method for class 'data.frame'
grab_index(x, from = NULL, to = NULL, ...)
## S3 method for class 'matrix'
grab_index(x, from = NULL, to = NULL, ...)
Arguments
x |
A character vector, |
from |
An integer to start from (if |
to |
A integer to get up to (if |
... |
ignored. |
Value
Returns a subset of the original data set.
Examples
grab_index(DATA, from = 2, to = 4)
grab_index(DATA$state, from = 2, to = 4)
grab_index(DATA$state, from = 2)
grab_index(DATA$state, to = 4)
grab_index(matrix(1:100, nrow = 10), 2, 4)
[Package textshape version 1.7.5 Index]