Skip to content

Add option to pre-download files #14

@terhorst

Description

@terhorst

Thanks for the really useful extension!

Pulling data into the web console is rather difficult -- many websites do not supply the necessary CORS headers, which causes download.files() to fail. (This is a known issue with webR.)

It would be helpful to add a files: [] clause to the configuration. You could map over this list similar to what is already done with packages:

await Promise.all(packages.map((pkg) => webR.installPackages(pkg)));

The necessary webR call would be something like webR.evalRvoid("download.files(...)"). But I'm not really sure where the file would end up/I don't understand the webR virtual filesystem in general. The desired behavior would be that specifying e.g.

format:
  revealjs:
    drop:
      engine: webr
      webr:
        files:
          - https://a.url/data.csv

would enable me to run read_csv("data.csv") later on and have it just work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions