webr
                                
                                 webr copied to clipboard
                                
                                    webr copied to clipboard
                            
                            
                            
                        Could not load dynamic lib: /usr/lib/R/library/png/libs/png.so
Hi! Trying out webr with the package BayesianReasoning. When creating a plot, I get an error that seems related to png.
The only missing dependency in https://repo.r-wasm.org/ for BayesianReasoning is curl, but curl is only used in a vignette.
  ---
  title: "webR test"
  filters:
    - "webr"
  ---
  
  
  ```{webr-r}
  
  webr::install("BayesianReasoning")
  
  BayesianReasoning::PPV_heatmap(Sensitivity = 90, limits_Specificity = c(90, 100))
  
Error: unable to load shared object '/usr/lib/R/library/png/libs/png.so': Could not load dynamic lib: /usr/lib/R/library/png/libs/png.so LinkError: imported function 'env.R_registerRoutines' signature mismatch
No idea but maybe is related to this? https://stackoverflow.com/a/50935430/1873521 It seems png may need libpng16-16 on ubuntu and similar systems.
Thanks for the amazing work.
Also, not sure if related, if I install ggplot2 and png, I get an error when printing ggplots. The same code commenting the -"png" line works fine:
---
title: "webR test"
filters:
  - "webr"
webr:
  packages:
  - "ggplot2"
  - "png"
---
Test:  
```{webr-r}
mpg |> 
  ggplot2::ggplot(aes(hwy, cty)) +
  ggplot2::geom_point() +
  ggplot2::theme_minimal()
Error: Problem while converting geom to grob.