MathJax

Tuesday, June 24, 2014

R cheatsheet


Preliminaries
  • install.packages("package_name",dependencies = TRUE) # install package
  • library(package_name) # load package
  • search() # list all packages attached
  • ls() # list all objects in environment/package
  • help(name) # help on package/function
  • getwd() # get working directory
  • list.files() # list files in working directory
  • save.image() # save workspace to .Rdata
  • savehistory() # save history to .Rhistory
Data types
  • class(obj) # class of object
  • dim() # dimension of matrix
  • length() # length of array
  • factor() # encode categorical variables using numeric storage (e.g. "red","orange","green")

Monday, June 23, 2014

Wish List for matlab parser


Parser features
  • Add parsing of 1-D and 2-D arrays
Param registration
  • Register params
  • Attach to ParseTree
  • Look up value based on hierarchical position of params
Vector dumping
  • Hierarchical file names
  • Header to include attributes and formats