One often encountered problem in reading in data is handling data in which there was little or no validation of the input. This occurs often with webforms that allow free-text entry for a field that has a natural structure. A typical example is date form-field that does not specify a date format. The data entered may be entered in a number of formats: mm/dd/yyyy or yyyy-mm-dd. Some packages such as lubridate or anytime attempt to read these values, but envariable they often do not catch all of the values. Some manual intervention is necessary.
The manual approach is rather tedious. Here we provide the facilities for trying multiple conversions/transformations choosing the correct one. This is not trivial as the results:
Coersion should handle this.
For example, p_excel_dt.character
should first try mdy_hms
, mdy
and
p_excel_dt.numeric
in that order.
This is like a similar to a vectorized na_replaces
Have a number of coercisions
Transformations are all about capturing data in its rawest form an capturing its data using semantics, context, etc.
It is expected that there is a validation for the informations. For example, if you are expecting the height of a person, you know that a person's height should be a numeric, continuous value and can not be more than 8'11.1".
These validattions should be included.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.