if (FALSE) {
meta <- list()
ds <- create_dataset("mydataverse", body = meta)
# Upload RDS dataset saved to local
saveRDS(mtcars, tmp <- tempfile(fileext = ".rds"))
f <- add_dataset_file(tmp, dataset = ds, description = "mtcars")
# Publish dataset
publish_dataset(ds)
# Update file and republish
saveRDS(iris, tmp)
update_dataset_file(tmp, dataset = ds, id = f,
description = "Actually iris")
publish_dataset(ds)
# Cleanup
unlink(tmp)
delete_dataset(ds)
}
Run the code above in your browser using DataLab