seek | R Documentation |
Searches rows/columns by name in an array-like object.
seek_columns(x, ...)
seek_rows(x, ...)
## S4 method for signature 'data.frame'
seek_rows(x, select = NULL, names = NULL, ...)
## S4 method for signature 'matrix'
seek_rows(x, select = NULL, names = NULL, ...)
## S4 method for signature 'data.frame'
seek_columns(x, select = NULL, names = NULL, ...)
## S4 method for signature 'matrix'
seek_columns(x, select = NULL, names = NULL, ...)
x |
An R object (should be a |
... |
Further arguments to be passed to |
select |
A |
names |
A |
An integer
vector or NULL
.
N. Frerebeau
Other data preparation tools:
append_column()
,
append_rownames()
,
assign()
,
compact()
,
count()
,
detect()
,
discard()
,
get()
,
keep()
## Seek columns
seek_columns(iris, select = startsWith, prefix = "Petal")
seek_columns(iris, names = c("Petal.Length", "Petal.Width"))
## Get columns
x <- get_columns(iris, select = startsWith, prefix = "Petal")
head(x)
x <- get_columns(iris, names = c("Petal.Length", "Petal.Width"))
head(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.