posit-dev / r-shinylive

https://posit-dev.github.io/r-shinylive/
Other
156 stars 16 forks source link

readR::read_csv CURL dependency? #89

Closed quincountychsmn closed 1 month ago

quincountychsmn commented 3 months ago

It appears that even if read_csv is declared like readR::read_csv, CURL is somehow involved; I follow CURL is not a supported package for shinyLive. Looking up the, supported shinyLive Packages, readR appears to be fully supported and CURL is not listed as a dependent package. However, this shinyLive Reproducible example shows what I am experiencing. This shinyLive application doesn't utilize the data but is here to show the application will not run if readr::read_csv is used.

The base r function read.csv works great but where I am confused is CURL's involvement when using readR::read_csv since it doesn't seem readR utilizes CURL.

georgestagg commented 1 month ago

Hi @quincountychsmn,

There are two issues when using read_csv():

1) There is a webR problem causing read_csv() to hang. Though, we can work around it by setting an option. The problem is tracked at: https://github.com/r-wasm/webr/issues/314

2) Reading from URL defaults to using the curl package. We can override this by using the base R url() function instead.

With changes to work around the above issues: Here is a working example.

quincountychsmn commented 1 month ago

Thank you, George.

I'm sorry I missed the previous issue. I would not have created this extra issue if I saw it. Thank you for providing the link to it.

georgestagg commented 1 month ago

I'm sorry I missed the previous issue. I would not have created this extra issue if I saw it.

No worries! Hope it helps.