cs_import: Import a File and Clean Names

View source: R/cs_import.R

cs_importR Documentation

Import a File and Clean Names

Description

Import file and clean names simultaneously

Usage

cs_import(file, which = 1)

Arguments

file

The file to be imported. Can be any file type supported by rio::import.

which

Which tab from an multi-tab Excel file.

Details

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.

Value

A data frame with clean names

Examples

library(datasets)

#' create CSV to import
rio::export(USArrests, "USArrests.csv")

#' import CSV and clean names
cs_import("USArrests.csv")


simscr/crsp documentation built on Sept. 29, 2023, 7:09 p.m.