View source: R/index_col.R View source: R/index_col.R
index_col | R Documentation |
Get index of a dataframe column by name, or get a name by index
Get index of a dataframe column by name, or get a name by index
index_col(data, column = NULL, id = NULL) index_col(data, column = NULL, id = NULL)
data |
must be a dataframe |
column |
specify the column name to return the index |
id |
specify the index of wanted column to return the name |
Provide either an id or a name to return a name or an id respectively
Provide either an id or a name to return a name or an id respectively
the index of column name, or the column name of the index
the index of column name, or the column name of the index
Ibrahim H. Elkhidir, originally
Ibrahim H. Elkhidir, originally
## Not run: index_col(iris, column = "Sepal.Length") index_col(iris, id = 1) index_col(iris, id = c(1, 2)) ## End(Not run) ## Not run: index_col(iris, column = "Sepal.Length") index_col(iris, id = 1) index_col(iris, id = c(1, 2)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.