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
804 stars 54 forks source link

Add inline documentation to evalR #436

Open JosiahParry opened 3 weeks ago

JosiahParry commented 3 weeks ago

I tried using evalRString() in the hopes that it would return the results as a string. However, it expects a string and will error if a string is not returned from the function.

It would be really nice if this expectation was documented in the API reference https://docs.r-wasm.org/webr/latest/api/js/classes/WebR.WebR.html#evalrstring

https://github.com/r-wasm/webr/blob/c07d8997ddbb58f63002e8d46792be54edcd134c/src/webR/webr-main.ts#L416-L418