View source: R/add_current_datetime_column.R
add_current_datetime_column | R Documentation |
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)
data |
Data frame. |
Data frame with an additional column containing the current date and time.
## Not run:
# 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)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.