read.simple.csv.named.vector | R Documentation |
Read in a data frame (csv), and extact a value and a name column, and convert them to a named vector. By default, it assumes the names in the first column and the values excel style named vectors, names in col1, headers SHIFTED. The header should start with a TAB / First column name should be empty.
read.simple.csv.named.vector(
file,
sep = ";",
col_names = FALSE,
value_col = 2,
name_col = 1,
...
)
file |
Path to the *.csv file. |
sep |
Separator character, Default: ';' alternative: ','. |
col_names |
Are there column names?, Default: TRUE |
value_col |
Column number of the values in the input data frame. Default: 2 |
name_col |
Column number of the names in the input data frame. Default: 1 |
... |
Additional arguments passed to |
read_delim
## Not run:
if (interactive()) {
# read.simple.csv.named.vector("path/to/my.file.csv")
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.