check_posixct_type {vvauditor} | R Documentation |
Check for POSIXct Type
Description
This function checks if the specified column in the provided dataframe has a POSIXct type. It uses the checkmate::assert_posixct function to perform the assertion.
Usage
check_posixct_type(column_name, dataframe, column_prefix = NULL, ...)
Arguments
column_name |
A character vector or string with the column name to be tested. |
dataframe |
The dataframe that contains the column. |
column_prefix |
Default is NULL. If provided, this text is prepended to the variable name in the assertion message. |
... |
The remaining parameters are passed to the function assert_posixct. |
See Also
Other assertions:
check_no_duplicates_in_group()
,
check_numeric_or_integer_type()
Other tests:
check_double_columns()
,
check_no_duplicates_in_group()
,
check_numeric_or_integer_type()
,
duplicates_in_column()
,
test_all_equal()
Examples
# Create a dataframe with a POSIXct column
dataframe <- data.frame(date = as.POSIXct("2023-10-04"))
# Check the POSIXct type of the 'date' column
check_posixct_type("date", dataframe)
[Package vvauditor version 0.6.0 Index]