if (FALSE) {
# Create a sample data frame
sample_df <- data.frame(
id = 1:3,
score = c(85, 92, 78),
group = c("A", "B", "A")
)
# Basic usage with prompt
to.sav(sample_df)
# Custom filename
to.sav(sample_df, "participants_data")
# Skip the confirmation prompt
to.sav(sample_df, skip_prompt = TRUE)
# Save in a different directory
to.sav(sample_df, path = "path/to/project")
}
Run the code above in your browser using DataLab