Hi everyone
I'm looking for a way to pin multiple documents to RStudio Connect as one zip file. I've learned that as from pins version 0.4.1 this option was added (see also https://github.com/rstudio/pins/issues/232).
Does anyone has done this before? In what class the objects have to be transferred to the pin-function?
What I've tried:
# create random files
testframe <- data.frame(a = c(1, 2, 3), b = c(1, 2, 3))
testframe2 <- data.frame(a = c(1, 2, 3, 4, 5), b = c(1, 2, 3, 4, 5))
testplot <- ggplot2::ggplot(data = testframe, ggplot2::aes(x=a, y=b)) +
ggplot2::geom_point()
testplot2 <- ggplot2::ggplot(data = testframe2, ggplot2::aes(x=a, y=b)) +
ggplot2::geom_point()
# create object containing objects to be pinned as one zip file
object_to_pin <- list(testframe=testframe, testframe2=testframe2, testplot=testplot, testplot2=testplot2)
# pin to Connect
pins::pin(x = object_to_pin , name = "Test", board = "rsconnect", zip = TRUE)
This code gives me the Error:
Error in gzfile(file, "rb") : cannot open the connection
In addition: Warning message:
In gzfile(file, "rb") :
cannot open compressed file '/home/USER/.cache/pins/rsconnect/USER/Test/data.rds', probable reason 'No such file or directory'