Intermediate Importing Data in R
Filip Schouwenaars
Instructor, DataCamp
Flat files
Excel files
What is a relational database?
How to connect?
How to read table?
DBMS
Open source
Proprietary
SQL = Structured Query Language
Different R packages
MySQL: RMySQL
PostgresSQL: RPostgresSQL
Oracle Database: ROracle
Conventions specified in DBI
install.packages("RMySQL")
library(DBI) # library(RMySQL) not required
con <- dbConnect(RMySQL::MySQL(), # Construct SQL driver
dbname = "company",
host = "courses.csrrinzqubik.us-
east-1.rds.amazonaws.com",
port = 3306,
user = "student",
password = "datacamp")
Intermediate Importing Data in R