| Author | DaveJarvis <email> |
|---|---|
| Date | 2021-12-30 14:10:39 GMT-0800 |
| Commit | d8a84b53b83c34e5384b7bc8d20d3dade0840e51 |
| Parent | 68c1521 |
| Delta | 18 lines added, 0 lines removed, 18-line increase |
| private final Processor<String> mPostProcessor = new ROutputProcessor(); | ||
| + /** | ||
| + * Set to {@code true} when the R bootstrap script is loaded successfully. | ||
| + */ | ||
| private final AtomicBoolean mReady = new AtomicBoolean(); | ||
| } | ||
| + /** | ||
| + * Answers whether R has been initialized without failures. | ||
| + * | ||
| + * @return {@code true} the R engine is ready to process inline R statements. | ||
| + */ | ||
| public boolean isReady() { | ||
| return mReady.get(); | ||
| } | ||
| + /** | ||
| + * Called when the {@link InlineRProcessor} is instantiated, which triggers | ||
| + * a re-evaluation of all R expressions in the document. Without this, when | ||
| + * the document is first viewed, no R expressions are evaluated until the | ||
| + * user interacts with the document. | ||
| + */ | ||
| + public void init() { | ||
| + mInlineRProcessor.init(); | ||
| + } | ||
| + | ||
| public boolean isReady() { | ||
| return mInlineRProcessor.isReady(); |