library(datasets)
export(iris, yml_file <- tempfile(fileext = ".yml"))
is_file_text(yml_file) # TRUE
export(iris, sav_file <- tempfile(fileext = ".sav"))
is_file_text(sav_file) # FALSE
# cleanup
unlink(yml_file)
unlink(sav_file)
Run the code above in your browser using DataLab