r-wasm / webr

The statistical language R compiled to WebAssembly via Emscripten, for use in web browsers and Node.
https://docs.r-wasm.org/webr/latest/
Other
848 stars 67 forks source link

Adding missing packages to webr #383

Open tstubbs-evolution opened 6 months ago

tstubbs-evolution commented 6 months ago

Hello,

I am hoping to use statscloud to design some teaching material. statscloud uses WebR for its R terminal interface. When trying to install a package, it gave the error "Requested package XXXXX not found in webR binary repo". I wanted to ask, can packages be added to the webR binary repo?

I wanted to use the the R package 'phytools', but when installing the dependencies, it stated:

Requested package mnormt not found in webR binary repo. Requested package phangorn not found in webR binary repo

Would it be possible to add mnormt, phangorn and phytools to the binary repo?

Best wishes, Tom

adrianolszewski commented 6 months ago

Oh yes, also: tseries, nloptr, glmnet, muhaz, arrangements, robustbase, curl - used itself Rmpfr, RcppZiggurat, gsl, deSolve - serving as auxiliary dependencies

These packages make key dependency in multiple important packages.

library(MKinfer)
Downloading webR package: MKdescr
Downloading webR package: boot
Warning in install(dep, repos, lib, quiet) :
  Requested package arrangements not found in webR binary repo.
Downloading webR package: exactRankTests
Downloading webR package: ellipsis

[...]

Downloading webR package: MKinfer
Error: could not find function "perm.t.test"
Error: package or namespace load failed for ‘MKinfer’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 there is no package called ‘arrangements’
tylermorganwall commented 6 months ago

Just wanted to add my +1 to nloptr: this package is imported by lme4, which is a core mixed effects modelling package.

georgestagg commented 6 months ago

The nloptr/lme4 packages are being tracked in r-wasm/rwasm#31.

adrianolszewski commented 6 months ago

I'm also wondering what makes the arrangements package to be missing - is this because making it a web assembly fails for some reason, or because it wasn't yet recompiled for web assembly?

This package seems to be rather rarely updated (looking at the GitHub metrics), but maybe the author will be willing to help ( https://github.com/randy3k/arrangements ). If not, then I will contact the author of the MKinfer package ( https://github.com/stamats/MKinfer ), which is just awesome set of permutation and bootstrap tests (so extensively using permutation generator), to maybe switch to something else, that is supported by web R.

SimoneBrazzi commented 3 weeks ago

I am also going to ask to add curl to webR. I am developing a website with quarto and I would like to have interactive plot with shinylive. I know it is possible to use iframe and recall a published shiny app, but the project will have tons of interactive plots.

laceym14 commented 2 weeks ago

Adding my +1 for curl, and would also like to request scrypt, MASS, Matrix, and V8 as I am developing a password-protected shiny app containing interactive plots and maps that include these packages as dependencies. Thank you!

pawelru commented 2 weeks ago

Upvote on MASS, Matrix and curl

georgestagg commented 2 weeks ago

MASS and Matrix should already be there, are they not working for you?

curl and V8 will be difficult, but are on our radar.

pawelru commented 2 weeks ago

Oh gosh, I was looking at the old logs! Yes - I confirm that both MASS and Matrix are already there!

laceym14 commented 2 weeks ago

Oh interesting, I see them there now too but for some reason I'm still getting the following warnings when I run shinylive::export(appdir = "app-dir", destdir = "export-dir"): 1: Can't find MASS in webR binary repository. 2: Can't find Matrix in webR binary repository. I'm using v0.2.0 of shinylive, I'm not sure why those two aren't recognized in the binary repo.

bakered commented 1 week ago

Also getting Warning messages: 1: Can't find MASS in webR binary repository. 2: Can't find Matrix in webR binary repository. on rendering quarto with shinylive. Although, it worked yesterday.