nuget server logo nuget api documents
↑

API Docs / REnv / GlobalEnvironment

GlobalEnvironment

Full name SMRUCC.Rsharp.Runtime.GlobalEnvironment Assembly REnv Members 24

the global environment of the R# interpreter runtime.

00 Remarks

R#之中的全局环境对象

01 Syntax

SMRUCC.Rsharp.Runtime.GlobalEnvironment

02 Methods

NameOverloadsSummary
.ctor 1 copy environment
GetResourceFile 1 system.file export to clr function for get the package data file
doCall 1 invoke a R function by name
GetType 1 get type definition from a given type object or type name
LoadLibrary 2 load library module
defaultEmpty 1
SetDebug 1
RedirectOutput 1

03 Properties

NameOverloadsSummary
polyglot 1 Enable programming in multiple kind of programming language
Rscript 1 the R# script host object
stdout 1 a TextWriter wrapper object
debugMode 1 RInterpreter.debug
lastException 1 用于traceback进行脚本函数调试使用
types 1 wrap runtime data type of RType or S4Object
scriptDir 1 if current executation is comes from the R script executation then this property will returns the directory path in the !script magic symbol object, otherwise will returns nothin…
options 1
packages 1
attachedNamespace 1
profiler2 1
log4vb_redirect 1
debugLevel 1
factors 1
symbolLanguages 1

04 Members

method .ctor #

copy environment

Parameters
NameTypeDescription
globalEnvGlobalEnvironment

-

method GetResourceFile #
GetResourceFile(String, String)

system.file export to clr function for get the package data file

Parameters
NameTypeDescription
resourceString

-

packageString

-

Returns

the full file path of the package internal resource data file

method doCall #
doCall(String, NamedValue(Of Object)())

invoke a R function by name

Parameters
NameTypeDescription
funcString

the R function name

argsNamedValue(Of Object)()

the named parameter list

method GetType #
GetType(Object)

get type definition from a given type object or type name

Parameters
NameTypeDescription
typeofObject

the object type value, and it should be one of the:

  1. class name from the RTypeExportAttribute
  2. .NET CLR Type value
  3. R-sharp RType value
  4. R-sharp primitive TypeCodes value
  5. TypeInfo metadata
Returns

this function returns nothing if the given typeof type information is nothing

method LoadLibrary #
LoadLibrary(String, Boolean, Boolean)

load library module

Parameters
NameTypeDescription
packageNameString

the library package name

silentBoolean

quietly option, suppress of print message?

ignoreMissingStartupPackagesBoolean

debug used only

Returns

this function returns an error message object instance if load package error, otherwise returns nothing means load the required package correctly.

method LoadLibrary overload 2 #
LoadLibrary(Type, String, Boolean)

Imports static api function from given package module

Parameters
NameTypeDescription
packageType

-

property polyglot #
polyglot

Enable programming in multiple kind of programming language

property Rscript #
Rscript

the R# script host object

property stdout #
stdout

a TextWriter wrapper object

property debugMode #
debugMode
property lastException #
lastException

用于traceback进行脚本函数调试使用

property types #
types

wrap runtime data type of RType or S4Object

property scriptDir #
scriptDir

if current executation is comes from the R script executation then this property will returns the directory path in the !script magic symbol object, otherwise will returns nothing

property options #
options
property packages #
packages
property attachedNamespace #
attachedNamespace
property profiler2 #
profiler2
property log4vb_redirect #
log4vb_redirect
property debugLevel #
debugLevel
property factors #
factors
property symbolLanguages #
symbolLanguages
method defaultEmpty #
defaultEmpty()
method SetDebug #
SetDebug(DebugLevels)
method RedirectOutput #
RedirectOutput(StreamWriter, OutputEnvironments)