if (FALSE) {
# Create a sample data frame
sample_df <- data.frame(
id = 1:3,
name = c("Alice", "Bob", "Charlie")
)
# Basic usage with prompt
to.csv(sample_df)
# Custom filename
to.csv(sample_df, "participants_data")
# Skip the confirmation prompt
to.csv(sample_df, skip_prompt = TRUE)
# Save in a different directory
to.csv(sample_df, path = "path/to/project")
}
Run the code above in your browser using DataLab