This function adds a new column to a data frame with the current date and time. The name of the new column is a combination of the provided prefix, stage, and "Date_time". If the new column already exists, it will be overwritten.

add_current_datetime_column(data)

Arguments

data

Data frame.

Value

Data frame with an additional column containing the current date and time.

Examples

if (FALSE) {
# Create a sample data frame
data <- data.frame(a = 1:5, b = letters[1:5])

# Add date to file name
add_current_datetime_column(data)
}