# RQGIS – integrating R with QGIS

Kurt Menge recently explained in his post how it is possible to use R from within QGIS – the leading and open-software Desktop GIS. This is great but to access the geoalgorithms provided by QGIS you would still have to use Python or the QGIS GUI. So it would come in quite handy, if one could access QGIS geoalgorithms from within R. And that’s exactly what the RQGIS package is doing. This opens up a whole new world of (geo-)statistical geocomputing.

The most notable features of RQGIS are:

• RQGIS accesses the Python QGIS API but R users can stay in the familiar R programming environment without having to touch Python.
• For the first time, you can access native QGIS algorithms from within R.
• QGIS itself integrates many third-party providers. Among these are GDAL, SAGA GIS, GRASS GIS and many more. RQGIS brings you this incredibly resourceful geoprocessing environment to the R console. Though it is a big advantage to be able to access SAGA and GRASS functions using only one package (RQGIS), RSAGA and rgrass7 (spgrass6) are still useful (and great packages by the way). For instance, not all SAGA and GRASS functions are available in QGIS.
• RQGIS offers convenience functions. For example, get_args_man mimics the behavior of the QGIS GUI by automatically retrieving all function arguments and corresponding default values for a given function. This makes the usage of RQGIS frequently more user-friendly compared to RSAGA and rgrass7 (spgrass6). But that is just my opinion and you are more than welcome to check it out.
• The second convenience function open_help lets the user access the QGIS online help for a specified geoalgorithm. Bar a few exceptions, this already works for all GRASS, QGIS and SAGA functions.

In the last few weeks we have been testing the package (though with a strong focus on GRASS, QGIS and SAGA functionalities). Within the next six weeks, we would like to put RQGIS on CRAN. Until then the R(-GIS) community is more than welcome to install the developer version. On https://github.com/jannes-m/RQGIS you will find a quick tour how to install and use RQGIS. We would appreciate any feedback, and of course you are welcome to contribute to our package.