Decimal character detection to csv files loading with data.table::fread
Character vector indicating the name (and route) of the file in which the decimal character must be guessed.
Numeric indicating the sample size of rows to use in the decimal character guessing.
With data coming from any place in the world, data loading functions have to
cope with different decimal characters, separator characters...
fread can autodetect separator character at loading
data, but decimal character must be specified in order to load correct data.
This function aims to provide an easy way to autodetect decimal character to
automatize data loading proccess.
A character vector containing the decimal character, to use in the fread order to load the data.
The process to determine the decimal character is as follows:
1000 rows and 4 variables are sampled from the data.
For each variable, number of dots (
.) and commas (
If the number of dots is larger than the commas, dot is selected as decimal character. If the number of commas is larger than the dots, comma is selected as decimal character.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.