Description Usage Arguments Details Value Examples
Make the maps for the data
1 | makeDataMap(leftSym, rightSym, rClass, matClass = "")
|
leftSym |
The left symbol that contains the Matlab data |
rightSym |
the right symbol that contains the Matlab data |
rClass |
The formal r class name that defines what the R data is outputted as |
matClass |
The name of the Matlab class that should be converted |
The requirements for conversion are the bounds given by both left and right symbols or the MatLab class. The Matlab class allows for the conversion of structures but is really just a dictionary for the different bounds.
A function that takes in a Matlab lines and changes the data into R data lines
1 2 3 4 5 6 7 | dataMap <- makeDataMap("[", "]", "matrix")
dataMap("thing <- [23,2, 3.2; 7, 6, 8]")
# "thing <- matrix(c(23, 2, 3.2, 7, 6, 8), nrow = 2, ncol = 3)"
dataMap <- makeDataMap(rClass = "list", matClass = "cell")
dataMap("otherThing <- {23,2, '3.2'; NaN, 6, 8}")
# "otherThing <- list(list(23, 2, '3.2'), list(NaN, 6, 8))"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.