Description Usage Arguments Value Examples
Pull out a single column by using its name or its position and name the obtained vector using values from another column.
1 | pull_with_names(.data, var = -1, name_col)
|
.data |
A data frame |
var |
The name of the column of interest, or a positive integer, giving the position counting from the left, or a negative integer, giving the position counting from the right. This argument supports tidyeval. |
name_col |
The column whose values will be used to name the pulled column. This argument supports tidyeval. |
A named vector.
1 | head(pull_with_names(iris, 4, "Species"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.