programming in r

4
Programming in R SQL in R

Upload: yael-perry

Post on 30-Dec-2015

19 views

Category:

Documents


0 download

DESCRIPTION

Programming in R. SQL in R. Running SQL in R. In this session I will show you how to: Run basic SQL commands within R. Running SQL in R. A few points about SQL: SQL stands for “Structured Query Language” - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Programming in R

Programming in R

SQL in R

Page 2: Programming in R

Running SQL in R

In this session I will show you how to:•Run basic SQL commands within R

Page 3: Programming in R

Running SQL in R

A few points about SQL: SQL stands for “Structured Query

Language” SQL is used for querying data and creating

tables for analysis – its is not really an analytical language.

To run SQL in R, we run the sqldf() function in the sqldf package.

When we write SQL code in R, we are writing SQL – not R. So some of the references will be different.

Page 4: Programming in R

Running SQL in R

The main SQL statements and clauses that will be covered in this set of notes include:

SELECTFROMLIMITASWHERE

LIKEGROUP BYHAVINGINNER

JOINOUTER

JOIN