# pack two packages
pkg1 <- system.file("examples/pkg1", package = "pkglite")
pkg2 <- system.file("examples/pkg2", package = "pkglite")
fc1 <- pkg1 %>% collate(file_default())
fc2 <- pkg2 %>% collate(file_default())
txt <- tempfile(fileext = ".txt")
pack(fc1, fc2, output = txt, quiet = TRUE)
# unpack the two packages
out <- file.path(tempdir(), "twopkgs")
txt %>% unpack(output = out, quiet = TRUE)
out %>%
file.path("pkg1") %>%
list.files()
out %>%
file.path("pkg2") %>%
list.files()
Run the code above in your browser using DataLab