Notes on R

R – an interpreted programming environment for statistical computing and graphics

Coming to R from Python and other programming languages, my notes are comparative versus exhaustive. See the following for a good guide.

There is a mechanism for installing R local packages (akin to the usage of virtualenv for isolated Python package installations)


Lists are like dictionaries

$ is a key (like [‘sfsf’] or dot)

data.frames are like pandas

dot just a naming convention

<- and <= assignment

Speed tips:
Vectorise (map/reduce like functions) vs looping in r

Can easily import/export CSV

Space tip – If you need to store large amounts of data, consider using binary vs ASCII or other plain text files.

Can access DBs directly, using data frames

Note to self, look up NETCDF (commonly used as a climate data format)

Nice built in datasets

Very easily generate charts and save the output to jpeg, pdf, etc. See for more options: