check_posixct_type.Rd
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.
check_posixct_type(column_name, dataframe, column_prefix = NULL, ...)
A character vector or string with the column name to be tested.
The dataframe that contains the column.
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.
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()
# 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)