l_nestedTclList2Rlist.Rd
Helper function to work with R and Tcl
l_nestedTclList2Rlist(tclobj, transform = function(x) { as.numeric(x) })
tclobj | |
---|---|
transform | a function to transfrom the string output to another data type |
a nested R list
tclobj <- .Tcl('set a {{1 2 3} {2 3 4 4} {3 5 3 3}}') l_nestedTclList2Rlist(tclobj)#> [[1]] #> [1] 1 2 3 #> #> [[2]] #> [1] 2 3 4 4 #> #> [[3]] #> [1] 3 5 3 3 #>