tcl.paired.to.list {Simile} | R Documentation |
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 nested list structure
Usage
tcl.paired.to.list(paired, as.enum.types)
Arguments
paired |
Nested list of alternating indices and values |
as.enum.types |
If TRUE, indices and values will be converted to R character strings, otherwise they are numeric |
Value
A numerical value or nested list of numerical values, from the Tcl value or array
Author(s)
Jasper Taylor
See Also
Examples
Simile:::tcl.paired.to.list("1 {1 7 2 4} 2 {1 8} 3 {2 1}", FALSE)
# [[1]]
# [[1]][[1]]
# [1] 7
#
# [[1]][[2]]
# [1] 4
#
#
# [[2]]
# [[2]][[1]]
# [1] 8
#
#
# [[3]]
# [[3]][[1]]
# NULL
#
# [[3]][[2]]
# [1] 1
[Package Simile version 1.3.3 Index]