Description Usage Arguments Value Examples
Function to return a vector with the contents of one column of a tbl_df The type of the column will be preserved if numeric or factor; all else will be conveted to a vector of character strings
1 | column_vector(d, i)
|
d |
a tbl |
i |
a character string containing the name of the column to be returned OR a single number representing the position of the column to be returned |
A vector containing the values from the specified column. The type will be numeric, factor, or character, depending on the type of the original column
1 2 3 | x <- dplyr::tbl_df(iris)
column_vector(x,2)
column_vector(x,"Species")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.