eq_clean_data: eq_clean_data

Description Usage Arguments Value Examples

View source: R/eq_clean_data.R

Description

You can use this function in two ways. Assigning the file_name (e.g. ../path/my_file.txt) with path or piping it as sequence of a read_delim.

Usage

1
eq_clean_data(file_name = rlang::.data)

Arguments

file_name

You can insert the file_name and path to reach the tsv file or pipe it with a read_delim.

Value

A DataFrame version of file_name. Have in mind, I have only cleaning few columns: EQ_PRIMARY, LOCATION_NAME, DATE, and TOTAL_DEATHS.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
# Loading using a third party function and then cleaning teh DataFrame.
readr::read_delim("inst/extdata/signif.txt",
                  delim = "\t") %>%
                          eq_clean_data()

# Piping a DataFrame.
any_dataframe %>% eq_clean_data()

# Assigning a file_name
eq_clean_data(file_name = "my_folder/signif.txt")
## End(Not run)

nandinigntr/MSDR documentation built on Jan. 1, 2021, 11:32 a.m.