RInterpreter
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| .ctor | 1 | 直接无参数调用这个构造函数,则会使用默认的配置文件创建R#脚本解释器引擎实例 |
| getDataStream | 1 | open the data file as stream from a given package with a specific resource reference name. |
| 2 | ||
| Inspect | 1 | do call str function for inspect the structure of the given obj |
| Imports | 1 | imports {pkgs} from "baseDll"; |
| LoadLibrary | 2 | Load packages from package name or dll module file |
| Add | 2 | |
| Set | 1 | declare new variable or set variable value |
| Invoke | 2 | invoke a R function by name |
| Evaluate | 2 | |
| InitializeEnvironment | 1 | |
| RunInternal | 1 | |
| Source | 1 | Run R# script program from a given script file. |
| FromEnvironmentConfiguration | 1 | |
| SetTaskCancelHook | 1 | |
| RedirectOutput | 1 | |
| options | 1 | |
| PrintMemory | 1 | |
| Run | 1 | |
| Parse | 1 | |
| Dispose | 1 | |
| op_Explicit | 1 |
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| globalEnvir | 1 | Global runtime environment. |
| debug | 1 | R# running in debug mode. |
| redirectError2stdout | 1 | 是否重定向错误消息输出至RInterpreter.RedirectOutput())函数所定义的输出设备之中 |
| strict | 1 | 是否在严格模式下运行R#脚本?默认为严格模式,即: 1. |
| GetValue | 1 | Get value of a Symbol |
| globalSymbols | 1 | get all symbols inside the global environment |
| Rsharp | 1 | Default R# script interpreter which is created on the default environment. |
| warnings | 1 | |
| silent | 1 | |
| verbose | 1 | |
| configFile | 1 | |
| isExecCancel | 1 |
04 Fields
| Name | Overloads | Summary |
|---|---|---|
| lastVariableName | 1 |
05 Members
String)直接无参数调用这个构造函数,则会使用默认的配置文件创建R#脚本解释器引擎实例
| Name | Type | Description |
|---|---|---|
envirConf | Options | - |
String, String)open the data file as stream from a given package with a specific resource reference name.
| Name | Type | Description |
|---|---|---|
dataName | String | - |
package | String | - |
String, Boolean)A shortcut of print(expr)
| Name | Type | Description |
|---|---|---|
expr | String | - |
auto | Boolean | 在自动条件下,会忽略掉expr为invisible 的结果打印 |
Object)do call str function for inspect the structure of the given obj
| Name | Type | Description |
|---|---|---|
obj | Object | - |
String(), String)imports {pkgs} from "baseDll";
attach_lib_dir
| Name | Type | Description |
|---|---|---|
pkgs | String() | - |
baseDll | String | - |
String, Boolean, Boolean)Load packages from package name or dll module file
| Name | Type | Description |
|---|---|---|
packageName | String | package namespace or dll module file path |
Type)Imports static api function from given package module
| Name | Type | Description |
|---|---|---|
package | Type | - |
Create a new symbol inside the R# runtime environment
| Name | Type | Description |
|---|---|---|
name$ | String | - |
value | Object | - |
type | TypeCodes | - |
String, Object)declare new variable or set variable value
| Name | Type | Description |
|---|---|---|
name | String | - |
value | Object | - |
String, Object())direct invoke
| Name | Type | Description |
|---|---|---|
funcName | String | the function name, can be prefixed with the package namespace |
args | Object() | the argument without names, this function will pass the argument value to target R# function directly with aligned with the function argument list. |
String, NamedValue(Of Object)())invoke a R function by name
the named parameter list will be aligned with the function argument list and then do function invoke.
| Name | Type | Description |
|---|---|---|
funcName | String | the R function name |
args | NamedValue(Of Object)() | the named parameter list |
String)Run R# script program from text data.
| Name | Type | Description |
|---|---|---|
script | String | The script text |
String, NamedValue(Of Object)())| Name | Type | Description |
|---|---|---|
source | String | The script file name |
arguments | NamedValue(Of Object)() | - |
| Name | Type | Description |
|---|---|---|
Rscript | Rscript | - |
arguments | NamedValue(Of Object)() | symbol values that will be pushed into the runtime environment context |
globalEnvir | Environment | - |
Run R# script program from a given script file. (运行脚本的时候调用的是RInterpreter.globalEnvir全局环境)
| Name | Type | Description |
|---|---|---|
filepath | String | The script file path. |
arguments | NamedValue(Of Object)() | - |
String)| Name | Type | Description |
|---|---|---|
configs | String | the filepath of the configuration file |
Global runtime environment.
(全局环境)
R# running in debug mode.
调试模式下,除了输出表达式的字符串信息之外 还会改变stop的行为,在非调试模式下,stop函数只会丢出错误消息并且终止脚本的运行 但是在调试模式下面,stop函数则会令程序抛出异常方便开发人员进行错误的定位
是否重定向错误消息输出至RInterpreter.RedirectOutput()函数所定义的输出设备之中
是否在严格模式下运行R#脚本?默认为严格模式,即:
- 所有的变量必须使用
let关键词进行申明
String)Get value of a Symbol
| Name | Type | Description |
|---|---|---|
name | String | - |
get all symbols inside the global environment
Default R# script interpreter which is created on the default environment.
CancellationTokenSource)StreamWriter, OutputEnvironments)String(), Nullable(Of Boolean), Nullable(Of Boolean))TextWriter)Object)String, Delegate)String, ValueTuple(Of String, Object)())String)