Helper function to work with R and Tcl
l_nestedTclList2Rlist(tclobj, transform = function(x) { as.numeric(x) })
a tcl object as returned by tcl or .Tcl.
tcl
.Tcl
a function to transfrom the string output to another data type
a nested R list
l_Rlist2nestedTclList
# NOT RUN { tclobj <- .Tcl('set a {{1 2 3} {2 3 4 4} {3 5 3 3}}') l_nestedTclList2Rlist(tclobj) # }
Run the code above in your browser using DataCamp Workspace