# NOT RUN {
meta <- list()
ds <- create_dataset("mydataverse", body = meta)
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