Closed mubashirqasim closed 11 months ago
I may not be entirely understanding the details of your problem, but here is one approach that works for me, similar to what is outlined in this vignette. First I write a pin:
library(pins)
board <- board_connect()
#> Connecting to Posit Connect 2023.05.0 at <https://colorado.posit.co/rsc>
data("mtcars")
data("iris")
data("airquality")
save.image("test-rdata-pin.RData", compress = TRUE)
board |> pin_upload("test-rdata-env", paths = "test-rdata-pin.RData")
Created on 2023-07-07 with reprex v2.0.2
And then in a new session I can read that pin and the objects in the environment are there:
library(pins)
board <- board_connect()
#> Connecting to Posit Connect 2023.05.0 at <https://colorado.posit.co/rsc>
board |> pin_download(name = "julia.silge/test-rdata-env") |> load()
ls()
#> [1] "airquality" "board" "iris" "mtcars"
Created on 2023-07-07 with reprex v2.0.2
Are you asking about getting the file into the working directory? I would probably use something like fs::fs_copy()
for that.
Let us know if you have further questions!
Thanks Julia, that helps!
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
First of all, thank you very much for a great R package. It works seamlessly with Azure, Connect and other services.
I have a hard time downloading the RData file from a Posit Connect pin. None of my solutions in the following example are working. Any thoughts on how to fix this?
PS: In a ShinyApp, it is possible to use ShinyApp_input_data.RData as a default option and download new data from pin only if it has been updated. In that case, download the updated data from pin and replace the local RData file in the project directory.