Databases in R

For some cases it is helpful to store the data not in a file, but in a database. Databases have some advantages when it comes to a large amount of data. The most important factor is that for calculations, just the actual data that is needed for the calculation needs to be loaded in the random access memory (RAM). Another advantage is the possibility to run calculations (stored procedures) with some database engines which will speed up some complex calculations with large data sets, as well as the abolition of exporting the results for other programs e.g. to plot the data with a GIS System. A very good and easy way to implement the database connection in R is with RODBC.