Initializing help system before first use

Rset

Purpose
Assign a Mosel value to an R object.
Synopsis
procedure Rset(dst:string, value:[set|array|list of] boolean|integer|real|string)
Arguments
dst 
An R variable name
value 
The Mosel value to be assigned to dst
Example
The following example assigns values 1.2, "hello" and an array with numbers 1 to 6 to the R objects a_num, a_string and a_vec respectively:
 Rset('a_num', 1.2)
 Rset('a_string', 'hello')
 Rset("a_vec", 1..6)        ! An R vector with real values 1 to 6
 Rset("dim(a_vec)", [2,3])  ! Change its dimensions into a 2x3 matrix
Further information
1. A new temporary R entity is created from value and then assigned to dst, unless value is a scalar and dst is an existing R entity of the corresponding type, in which case dst is just set to the new value
2. Argument dst can represent any assignable expression (including subsetting and attributes).
3. The type of argument value can be any elementary Mosel type, or an array, list or set of these (compositions are not supported).
4. When value is an array, for each of the array's dimensions, its index values are exported into the corresponding R array's names or dimnames attribute (after conversion to string) unless the indices are integer values from 1 to that dimension size.
5. If value is a dynamic array, only the existing values are copied to R and the remaining array entries are set to NA (Not Available).
Related topics

© 2001-2022 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.