cs_import | R Documentation |
Import file and clean names simultaneously
cs_import(file, which = 1)
file |
The file to be imported. Can be any file type supported by rio::import. |
which |
Which tab from an multi-tab Excel file. |
This function combines the import function from the rio package and the clean_names function from the janitor package. I got tired of using those two functions in succession for every file.
A data frame with clean names
library(datasets)
#' create CSV to import
rio::export(USArrests, "USArrests.csv")
#' import CSV and clean names
cs_import("USArrests.csv")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.