Description Usage Arguments Value Note Author(s) See Also Examples
Convert a set of values from a Simile model component from a nested list of alternating indices and values to an R array structure
1 | tcl.paired.to.array(paired, dims, as.enum.types)
|
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 |
A numerical value or array of numerical values, from the Tcl value or array
Note that the dimensions of the array returned will be in the opposite order from those supplied in the 'dims' argument. This is because Simile's convention is to list the outermost dimension first, whereas R's is to list the outermost dimension last.
Jasper Taylor
1 2 3 4 5 | 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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.