One cool feature of R is the ease of data handling. Lists, data frames and matrices can easily be accessed and indexed, making vector-oriented programming easy. When switching over to C/RCPP, things are a little different. Personally, I like the Armadillo library, since it gets me as close to R or Matlab as possible. One thing I have been missing though is quick access to matrix elements through brackets and logical statements. I have written some functions for illustration:
Try it out
Try it out
Keine Kommentare:
Kommentar veröffentlichen