Class: Shelter
WebR.Shelter
WebR shelters provide fine-grained control over the lifetime of R objects.
Table of contents
Properties
Methods
Properties
RCall
• RCall: ProxyConstructor<typeof RCall, RCall>
Defined in
webR/webr-main.ts:646
RCharacter
• RCharacter: ProxyConstructor<typeof RCharacter, RCharacter>
Defined in
webR/webr-main.ts:637
RComplex
• RComplex: ProxyConstructor<typeof RComplex, RComplex>
Defined in
webR/webr-main.ts:638
RDataFrame
• RDataFrame: ProxyConstructor<typeof RDataFrame, RDataFrame>
Defined in
webR/webr-main.ts:641
RDouble
• RDouble: ProxyConstructor<typeof RDouble, RDouble>
Defined in
webR/webr-main.ts:636
REnvironment
• REnvironment: ProxyConstructor<typeof REnvironment, REnvironment>
Defined in
webR/webr-main.ts:643
RInteger
• RInteger: ProxyConstructor<typeof RInteger, RInteger>
Defined in
webR/webr-main.ts:635
RList
• RList: ProxyConstructor<typeof RList, RList>
Defined in
webR/webr-main.ts:640
RLogical
• RLogical: ProxyConstructor<typeof RLogical, RLogical>
Defined in
webR/webr-main.ts:634
RObject
• RObject: ProxyConstructor<typeof RObject, RObject>
Defined in
webR/webr-main.ts:633
RPairlist
• RPairlist: ProxyConstructor<typeof RPairlist, RPairlist>
Defined in
webR/webr-main.ts:642
RRaw
• RRaw: ProxyConstructor<typeof RRaw, RRaw>
Defined in
webR/webr-main.ts:639
RString
• RString: ProxyConstructor<typeof RString, RString>
Defined in
webR/webr-main.ts:645
RSymbol
• RSymbol: ProxyConstructor<typeof RSymbol, RSymbol>
Defined in
webR/webr-main.ts:644
Methods
captureR
▸ captureR(code, options?): Promise<{ images: ImageBitmap[] ; output: { data: any ; type: string }[] ; result: RObject }>
Evaluate the given R code, capturing output.
Stream outputs and conditions raised during execution are captured and returned as part of the output of this function. Returned R objects are protected by the shelter.
Parameters
| Name | Type | Description |
|---|---|---|
code |
string |
The R code to evaluate. |
options? |
EvalROptions |
Options for the execution environment. |
Returns
Promise<{ images: ImageBitmap[] ; output: { data: any ; type: string }[] ; result: RObject }>
An object containing the result of the computation, an array of output, and an array of captured plots.
Defined in
webR/webr-main.ts:746
destroy
▸ destroy(x): Promise<void>
Parameters
| Name | Type |
|---|---|
x |
RObject |
Returns
Promise<void>
Defined in
webR/webr-main.ts:689
evalR
▸ evalR(code, options?): Promise<RObject>
Evaluate the given R code.
Stream outputs and any conditions raised during execution are written to the JavaScript console. The returned R object is protected by the shelter.
Parameters
| Name | Type | Description |
|---|---|---|
code |
string |
The R code to evaluate. |
options? |
EvalROptions |
Options for the execution environment. |
Returns
Promise<RObject>
The result of the computation.
Defined in
webR/webr-main.ts:715
purge
▸ purge(): Promise<void>
Returns
Promise<void>
Defined in
webR/webr-main.ts:681
size
▸ size(): Promise<number>
Returns
Promise<number>
Defined in
webR/webr-main.ts:697