ropensci / git2rdata

An R package for storing and retrieving data.frames in git repositories.
https://ropensci.github.io/git2rdata/
GNU General Public License v3.0
99 stars 12 forks source link

save to zip #52

Closed diplodata closed 4 years ago

diplodata commented 5 years ago

Any view on possibiity of saving to zipped rather than raw?

ThierryO commented 5 years ago

Can you elaborate a bit more on the workflow you have in mind? Is it a workflow with or without version control?

diplodata commented 5 years ago

Well yes this would be for use-cases where version control was not necessary, but e.g. you need to squeeze bigger files under the size limit or prioritise download time.

ThierryO commented 5 years ago

With the current version you can do something like this

data("sleep")
library(git2rdata)
files <- write_vc(sleep, file = "sleep", sorting = c("group", "ID"))
utils::zip("sleep.zip", files)

Note that write_vc() and read_vc() need to .yml and .tsv file to work. So you'll need to unzip the zip files before working with them.