What language to use for data analysis is the most hackneyed and painful topic. Therefore, we teamed up with Alexey Seleznyov, head of analytics at Netpeak and the author of the telegram channel R4Marketing , and prepared a comparison of SQL operators and verbs of the R language. For convenience and portability, we did it in cards.
We publish even more interesting materials on programming and data analysis every day in our Telegram channel and in the VK group . Perhaps you will find something interesting for yourself.
However, to the point!
R vs SQL
The first thing to do before making a comparison is to brush up on basic SQL statements. Of course, you all remember them, but suddenly ...
We will consider the DML (Data Manipulation Language) SELECT statement and everything related to it:
The SELECT statement itself governs which fields to select from the table
The FROM clause points to the table from which the selection is made
The WHERE clause filters the table by the values ββof a particular column
GROUP BY specifies grouping fields for calculating aggregating characteristics
ORDER BY operator sorts table rows by values ββin some column
, . R? - dplyr R ( ), .
dplyr ( tidyverse) , , :
, ,
dplyr tidy data
( %>%)
, SQL dplyr:
, , dplyr . - , :) , (.. dplyr - tidyverse) . :
Tidy data
tidy data. , 100% .
, , Β« Β»:
Data Analysis:
«» , «» -.
tidy datasets dplyr !
, tidy data .
%>%
, R - %>%. , , tidyverse.
- .
, - 2 : R, SQL, - . R - , - .