Learn R Programming

Simile (version 1.3.4)

tcl.paired.to.array: Re-format model value array

Description

Convert a set of values from a Simile model component from a nested list of alternating indices and values to an R array structure

Usage


tcl.paired.to.array(paired, dims, as.enum.types)

Value

A numerical value or array of numerical values, from the Tcl value or array

Arguments

paired

Nested list of alternating indices and values

dims

Dimensions of R array structure

as.enum.types

If TRUE, values will be converted to R character strings, otherwise they are numeric

Author

Jasper Taylor

See Also

tcl.paired.to.list

Examples

Run this code
Simile:::tcl.paired.to.array("1 {1 7 2 4} 2 {1 8 2 6} 3 {1 9 2 1}",
c(3,2), FALSE)
#     [,1] [,2] [,3]
#[1,]    7    8    9
#[2,]    4    6    1

Run the code above in your browser using DataLab