PostgreSQL Explained for R-Users and R-Programmers
2020-03-06
Chapter 1 Prerequisites
For anyone interested in using this book you will need the following packages and tools to follow along.
- RPostgresql
- DBI
- Your own PostgreSQL database
- Remote access to your database
The RPostgreSQL and DBI package can be installed from CRAN or Github:
install.packages("RPostgreSQL")
install.packages("DBI")
devtools::install_git('https://github.com/r-dbi/DBI.git')
devtools::install_git('https://github.com/cran/RPostgreSQL.git)
Notes on using SQL syntax in RPostgreSQL
To successfully query data in PostgreSQL the following caveats may be necessary. This is especially the case if someone has created column names that are unique and odd in some form or fashion.
- use backslahes to escape the quotes "" that are necessary when querying data.
- use quotes "" around camel back title cases e.g. “Medu” or “Fedu”