50 likes | 121 Views
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”
E N D
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” • 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.
Running SQL in R The main SQL statements and clauses that will be covered in this set of notes include: • SELECT • FROM • LIMIT • AS • WHERE • LIKE • GROUP BY • HAVING • INNER JOIN • OUTER JOIN