View source: R/qc_data_general_checks.R
qc_as_timestamp | R Documentation |
Converting known bad timestamp formats to POSIXt and setting the correct timezone
qc_as_timestamp(data, site_data, parent_logger = "test")
data |
Data frame containing timestamp variable. Also it can be a vector with timestamp values |
When loading data from csv files, depending on the office version and workflow to introduce timestamp and data, timestamp can result in the wrong format (lost of seconds, for example). This function checks for known formatting errors and try to fix them.
An object of the same type of input (data frame or vector) with the fixed values of timestamp. If timestamp is already in format, a message appears and none fix is made, returning data as entered. If timestamp can not be fixed, an error is raised.
This function also set the timezone attribute to the POSIXt timestamp.
It uses qc_get_timezone
and qc_set_timezone
functions internally to get the timezone from the env_time_zone
variable, transforming it to a compatible timezone name and set it as a
POSIXt attribute.
Other Data Loading Functions:
dl_data_col_classes()
,
dl_get_si_code_psi()
,
dl_metadata()
,
remove_dupcols()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.