C# Class Microsoft.R.DataInspection.RValueRepresentations

Mostrar archivo Open project: Microsoft/RTVS

Public Methods

Method Description
Deparse ( int maxLength = null ) : string

Returns an R expression that evaluates to a function that is suitable for use as the repr argument when invoking RSessionExtensions.TryEvaluateAndDescribeAsync and its wrappers. The representation produced by that function is the same as R function deparse(), except that result is concatenated to form a single string, and optionally truncated.

Str ( int maxLength = null, int expectedLength = null, string overflowSuffix = null ) : string

Returns an R expression that evaluates to a function that is suitable for use as the repr argument when invoking RSessionExtensions.TryEvaluateAndDescribeAsync and its wrappers. The representation produced by that function is the same as R function str(), except that result is returned as a single string instead of being printed.

Single-element vectors are special-cased by removing the type prefix. For example, while str(42) will produce "num 42", the function produced by this helper will return "42".

Method Details

Deparse() public static method

Returns an R expression that evaluates to a function that is suitable for use as the repr argument when invoking RSessionExtensions.TryEvaluateAndDescribeAsync and its wrappers. The representation produced by that function is the same as R function deparse(), except that result is concatenated to form a single string, and optionally truncated.
public static Deparse ( int maxLength = null ) : string
maxLength int /// Maximum length of the output - if representation is longer than that, it is truncated to match. This value /// cannot be lower than 20, or higher than 500 - if it is, it is adjusted to fit into that range. /// If , the represnetation is not truncated. ///
return string

Str() public static method

Returns an R expression that evaluates to a function that is suitable for use as the repr argument when invoking RSessionExtensions.TryEvaluateAndDescribeAsync and its wrappers. The representation produced by that function is the same as R function str(), except that result is returned as a single string instead of being printed.
Single-element vectors are special-cased by removing the type prefix. For example, while str(42) will produce "num 42", the function produced by this helper will return "42".
public static Str ( int maxLength = null, int expectedLength = null, string overflowSuffix = null ) : string
maxLength int /// Maximum length of the output - if representation is longer than that, it is truncated to match, and /// is appended. If , the representation is not truncated. ///
expectedLength int /// An upper bound estimate of the expected length of the output. If the output fits into the specified length, /// it avoids potentially expensive reallocations of memory buffer used to capture the output of str, /// by preallocating the buffer in advance. This parameter is for optimization purposes only, and will not /// cause an error even if the output exceeds the expected length. If , a reasonable /// default value is used for buffer size. ///
overflowSuffix string /// A string suffix that is appended to the truncated representation if it exceeded . /// If , "..." is used as a suffix. ///
return string