C# Class Microsoft.R.DataInspection.RSessionExtensions

Mostrar archivo Open project: Microsoft/RTVS

Public Methods

Method Description
DescribeChildrenAsync ( this session, string environmentExpression, string expression, REvaluationResultProperties properties, string repr, int maxCount = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task>

Computes the children of the object represented by the given expression, and returns a collection of evaluation objects describing each child. See RSessionExtensions.TryEvaluateAndDescribeAsync for the meaning of other parameters.

The resulting collection has an item for every child. If the child could be retrieved, and represents a value, the corresponding item is an IRValueInfo instance. If the child represents a promise, the promise is not forced, and the item is an IRPromiseInfo instance. If the child represents an active binding, the binding may be evaluated to retrieve the value, and the item is an IRActiveBindingInfo instance. If the child could not be retrieved, the item is an IRErrorInfo instance describing the error that prevented its retrieval.

Where order matters (e.g. for children of atomic vectors and lists), children are returned in that order. Otherwise, the order is undefined. If an object has both ordered and unordered children (e.g. it is a vector with slots), then it is guaranteed that each group is reported as a contiguous sequence within the returned collection, and order is honored within each group; but groups themselves are not ordered relative to each other.

EvaluateAndDescribeAsync ( this session, string expression, REvaluationResultProperties properties, string repr, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Like TryEvaluateAndDescribeAsync(IRSession, string, REvaluationResultProperties, string, CancellationToken), but throws RException if result is an IRErrorInfo.

EvaluateAndDescribeAsync ( this session, string environmentExpression, string expression, string name, REvaluationResultProperties properties, string repr, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Like TryEvaluateAndDescribeAsync(IRSession, string, string, string, REvaluationResultProperties, string, CancellationToken), but throws RException if result is an IRErrorInfo.

TryEvaluateAndDescribeAsync ( this session, string expression, REvaluationResultProperties properties, string repr, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Like TryEvaluateAndDescribeAsync(IRSession, string, string, string, REvaluationResultProperties, string, CancellationToken), but evaluates in the global environment (.GlobalEnv), and the result is not named.

TryEvaluateAndDescribeAsync ( this session, string environmentExpression, string expression, string name, REvaluationResultProperties properties, string repr, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Evaluates an R expresion in the specified environment, and returns an object describing the result.

Method Details

DescribeChildrenAsync() public static method

Computes the children of the object represented by the given expression, and returns a collection of evaluation objects describing each child. See RSessionExtensions.TryEvaluateAndDescribeAsync for the meaning of other parameters.

The resulting collection has an item for every child. If the child could be retrieved, and represents a value, the corresponding item is an IRValueInfo instance. If the child represents a promise, the promise is not forced, and the item is an IRPromiseInfo instance. If the child represents an active binding, the binding may be evaluated to retrieve the value, and the item is an IRActiveBindingInfo instance. If the child could not be retrieved, the item is an IRErrorInfo instance describing the error that prevented its retrieval.

Where order matters (e.g. for children of atomic vectors and lists), children are returned in that order. Otherwise, the order is undefined. If an object has both ordered and unordered children (e.g. it is a vector with slots), then it is guaranteed that each group is reported as a contiguous sequence within the returned collection, and order is honored within each group; but groups themselves are not ordered relative to each other.

/// Raised if the operation fails as a whole (note that if only specific children cannot be retrieved, those /// children are represented by instances in the returned collection instead). ///
public static DescribeChildrenAsync ( this session, string environmentExpression, string expression, REvaluationResultProperties properties, string repr, int maxCount = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task>
session this
environmentExpression string
expression string
properties REvaluationResultProperties
repr string
maxCount int If not , return at most that many children.
cancellationToken System.Threading.CancellationToken
return Task>

EvaluateAndDescribeAsync() public static method

Like TryEvaluateAndDescribeAsync(IRSession, string, REvaluationResultProperties, string, CancellationToken), but throws RException if result is an IRErrorInfo.
public static EvaluateAndDescribeAsync ( this session, string expression, REvaluationResultProperties properties, string repr, CancellationToken cancellationToken = default(CancellationToken) ) : Task
session this
expression string
properties REvaluationResultProperties
repr string
cancellationToken System.Threading.CancellationToken
return Task

EvaluateAndDescribeAsync() public static method

Like TryEvaluateAndDescribeAsync(IRSession, string, string, string, REvaluationResultProperties, string, CancellationToken), but throws RException if result is an IRErrorInfo.
public static EvaluateAndDescribeAsync ( this session, string environmentExpression, string expression, string name, REvaluationResultProperties properties, string repr, CancellationToken cancellationToken = default(CancellationToken) ) : Task
session this
environmentExpression string
expression string
name string
properties REvaluationResultProperties
repr string
cancellationToken System.Threading.CancellationToken
return Task

TryEvaluateAndDescribeAsync() public static method

Like TryEvaluateAndDescribeAsync(IRSession, string, string, string, REvaluationResultProperties, string, CancellationToken), but evaluates in the global environment (.GlobalEnv), and the result is not named.
public static TryEvaluateAndDescribeAsync ( this session, string expression, REvaluationResultProperties properties, string repr, CancellationToken cancellationToken = default(CancellationToken) ) : Task
session this
expression string
properties REvaluationResultProperties
repr string
cancellationToken System.Threading.CancellationToken
return Task

TryEvaluateAndDescribeAsync() public static method

Evaluates an R expresion in the specified environment, and returns an object describing the result.
public static TryEvaluateAndDescribeAsync ( this session, string environmentExpression, string expression, string name, REvaluationResultProperties properties, string repr, CancellationToken cancellationToken = default(CancellationToken) ) : Task
session this
environmentExpression string /// R expression designating the environment in which will be evaluated. ///
expression string Expression to evaluate.
name string of the returned evaluation result.
properties REvaluationResultProperties Specifies which properties should be present in the result.
repr string /// An R expression that must evaluate to a function that takes an R value as its sole argument, and returns the /// string representation of that argument as a single-element character vector. The representation is stored in /// property of the produced result. If this argument is /// , no representation is computed, and /// will also be . /// Use helper properties and methods in to obtain an appropriate expression /// for standard R functions such as deparse() or str(). ///
cancellationToken System.Threading.CancellationToken
return Task