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

Convert `TypedArray`, `ArrayBuffer` and `ArrayBufferView` JS objects to R raw atomic vectors #363

Closed georgestagg closed 7 months ago

georgestagg commented 7 months ago

ArrayBuffer objects are wrapped in an Uint8Array view for transfer via msgpack. This does not matter so much, as the worker thread converts both types to the same type of R object, a raw atomic vector.