# get example data from the opendataformat package
df <- get(data("data_odf"))
# write R data frame with attributes to the file my_data.zip specified
# as Open Data Format.
write_odf(x = df, paste0(tempdir(), "/my_data.zip"))
# write R data frame with attributes to the file my_data.zip
# with selected language.
write_odf(x = df, paste0(tempdir(), "/my_data.zip"), languages = "en")
# write R data frame with attributes to the file my_data.zip but only
# metadata, no data.
write_odf(x = df, file = paste0(tempdir(), "/my_data.zip"), export_data = FALSE)
Run the code above in your browser using DataLab