Рет қаралды 1,747
More from George Stagg on what’s new in the webR 0.2 release series, this time on webR’s developer API. If you’re a JavaScript or TypeScript developer, give webR a try and see what you might use it for!
WebR makes it possible to run R code in the browser without the need for an R server to execute the code: the R interpreter runs directly on the user’s machine.
It is possible to work entirely within webR and the R graphics devices, but you might also want to integrate webR into external JavaScript or TypeScript frameworks, including visualization packages. Learn about how to do this and more with webR’s developer API, including plotting data from webR using Observable JS, recent performance improvements, better error handling, worker event messages, and neatly terminating a webR session.
00:15 Performance improvements working with JavaScript
02:50 Example: Plotting data from webR using Observable JS
04:35 Type predicate functions and type conversion
07:30 Handling errors with webRError
09:15 Event messages from webr::canvas()
10:25 Safely handling webR termination
12:30 Links to documentation and resources
Website and developer documentation: docs.r-wasm.org/
Examples of using webR with Observable JS:
Loading webR and R data manipulation: observablehq.c...
Bitmap plotting and custom fonts: observablehq.c...