ketchbrookanalytics / shiny_arrow

Example code representing a real-life use case for using {arrow} to improve a Shiny application
https://ketchbrookanalytics.shinyapps.io/shiny_arrow/
17 stars 0 forks source link

Unable to restore lockfile #2

Open fontikar opened 11 months ago

fontikar commented 11 months ago

Hey folks! I'm currently working on a Shiny App that uses .parquets so I was really excited to see the blog post and example app + repo.

I am a beginner with renv and unfortunately, was not able to restore() successfully. I would normally include a reprex but because I'm in this cloned repo, this was not possible - I have passed the error and last few lines of the printed message.

Retrieving 'https://mran.microsoft.com/snapshot/2022-11-20/bin/macosx/big-sur-arm64/contrib/4.2/bit_4.0.4.tgz' ...
The following error(s) occurred while retrieving 'arrow':

    - character(0)
    - character(0)
    - character(0)
    - character(0)

Error: failed to retrieve package 'arrow'
In addition: Warning message:
curl: (6) Could not resolve host: mran.microsoft.comcurl: (6) Could not resolve host: mran.microsoft.comcurl: (6) Could not resolve host: mran.microsoft.comcurl: (6) Could not resolve host: mran.microsoft.com 
Traceback (most recent calls last):
8: renv::restore()
7: renv_restore_run_actions(project, diff, current, lockfile, rebuild)
6: renv_retrieve(packages)
5: handler(package, renv_retrieve_impl(package))
4: renv_retrieve_impl(package)
3: renv_retrieve_repos(record)
2: stopf("failed to retrieve package '%s'", record$Package)
1: stop(sprintf(fmt, ...), call. = call.)

Specifically, I want to know where to best store my .parquets inside my R package and more importantly, be able to access these in my server.R and ui.R using system.file("data/XX.parquet", package = "packagename") or alike

I have tried placing .parquets:

Both attempts have been unsuccessful :(

My app lives here: https://github.com/traitecoevo/infinitylists if you have any interest in taking a peek

Really excited about Shiny + Arrow combo!

mthomas-ketchbrook commented 10 months ago

Hi @fontikar ! Sorry you ran into that issue. I don't have time this second to provide the a new lock.file, but will get to it as soon as possible.

The reason behind this issue is that at least some packages in the lock.file were using MRAN as the repository manager when this blog post was authored (instead of using CRAN, or RSPM, etc.). MRAN was retired in 2023.

fontikar commented 10 months ago

HI @mthomas-ketchbrook thanks for getting back to me! No rush on this! I managed to arrive on a solution for using parquets in a shiny app I'm working on but always interested in seeing how this is done in this example! :)