George Stagg
Teaching and Research Technical Officer at the School of Mathematics, Statistics and Physics, Newcastle University.
George's activity
George Stagg commented on Make a plot 2 years, 9 months ago
SVG output now works. I've compiled the svglite package for webR and set things up so it can be loaded into the filesystem.
I tried to make it work nicely by adding a r_load_package(pkg_name) function that takes a package name and loads it, ready to be used with R's library() function, and add it to the pre_submit note so that it loads the package before the student's code runs. However, there's an issue where unless the webR runner is already loaded and ready to go the image doesn't appear until the second time the part is submitted.
When it happens the output svg doesn't exist in the virtual filesystem at all, so I think there's an issue with my promises that are supposed to resolve only once the WASM libraries are finished compiling. I've worked around it for now by loading the package in the question preamble.
George Stagg on Make a plot 2 years, 9 months ago
Saved a checkpoint:
Tweaked for newest version of the runner and SVG file output.
George Stagg on Write an R function to approximate $e$ 2 years, 9 months ago
Gave some feedback: Needs to be tested
George Stagg on Query the built-in mtcars dataset 2 years, 9 months ago
Gave some feedback: Needs to be tested
George Stagg created Query the built-in mtcars dataset 2 years, 9 months ago
George Stagg commented on Make a plot 2 years, 9 months ago
That's awesome, thanks! Pyodide gives access to the same Emscripten filesystem API that I'm using for webR here, via pyodide.FS. So, later if we like this method we should be able to extend it to do the same thing there.
George Stagg commented on Exploration activity: Define a class, add methods to it, then use it 2 years, 9 months ago
> I've changed the placeholder option for the widget to render(settings["placeholder"]), so it subs into curly braces.
How can I escape the curly braces for R code? I tried \{ which got rid of an error but the \ fell through into the output too.
George Stagg created Write an R function to approximate $e$ 2 years, 9 months ago
George Stagg created Make a plot 2 years, 9 months ago
George Stagg commented on Sum of triangular numbers (with optional steps) 2 years, 9 months ago
Apologies, some of those issues might be me, I'm adding back R into the latest version of the extension.