Description Usage Arguments Details Value Examples
Make the maps for converting slice notation
1 | makeSliceMap(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 |
Slice notation for matrices are tricky because they can easily be confused with 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 string and converts all the given slice notation
1 2 3 4 5 6 7 | sliceMap <- makeSliceMap("{", "}", "list")
sliceMap("junk <- importData{300}")
# "junk <- importData[[300]]"
sliceMap <- makeSliceMap(matClass = "structure", rClass = "list")
sliceMap("junk <- students.AP.GPA")
# junk <- students[['AP']][['GPA']]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.