Skip to content

Files

Latest commit

334a6f6 · Oct 20, 2018

History

History
59 lines (59 loc) · 4.76 KB

11-dplyr_sql_summary_table.tsv

File metadata and controls

59 lines (59 loc) · 4.76 KB
1
InDplyr_FunctiondescriptionSQL_ClauseNotesCategory
2
Yarrange()Arrange rows by variablesORDER BYBasic single-table verbs
3
Y?distinct()Return rows with matching conditionsSELECT distinct *Basic single-table verbs
4
Yselect() rename()Select/rename variables by nameSELECT column_name alias_nameBasic single-table verbs
5
Npull()Pull out a single variableSELECT column_name;Basic single-table verbs
6
Ymutate() transmute()Add new variablesSELECT computed_value computed_nameBasic single-table verbs
7
Ysummarise() summarize()Reduces multiple values down to a single valueSELECT aggregate_functions GROUP BYBasic single-table verbs
8
Ngroup_by() ungroup()Objects exported from other packagesGROUP BY no ungroupBasic single-table verbs
9
Ndistinct()Select distinct/unique rowsSELECT distinct {colname1,...colnamen}Basic single-table verbs
10
Ndo()Do anythingNABasic single-table verbs
11
Nsample_n() sample_frac()Sample n rows from a tableORDER BY RANDOM() LIMIT 10Basic single-table verbs
12
Nslice()Select rows by positionSELECT row_number() over (partition by expression(s) order_by exp)Basic single-table verbs
13
Ytally() count() add_tally() add_count()Count/tally observations by groupGROUP BYSingle-table helpers
14
Ytop_n()Select top (or bottom) n rows (by value)ORDER BY VALUE {DESC} LIMIT 10Single-table helpers
15
Narrange_all() arrange_at() arrange_if()Arrange rows by a selection of variablesORDER BYscoped-Operate on a selection of variables
16
Nfilter_all() filter_if() filter_at()Filter within a selection of variablesWHEREscoped-Operate on a selection of variables
17
Ngroup_by_all() group_by_at() group_by_if()Group by a selection of variablesGROUP BYscoped-Operate on a selection of variables
18
Nselect_*Select and rename a selection of variablesASscoped-Operate on a selection of variables
19
Nsummarise_*()Summarise and mutate multiple columns.scoped-Operate on a selection of variables
20
Nall_vars() any_vars()Apply predicate to all variablesscoped-Operate on a selection of variables
21
Nvars()Select variablesscoped-Operate on a selection of variables
22
Nfuns()Create a list of functions calls.scoped-Operate on a selection of variables
23
Nall_equal() all.equal(<tbl_df>)Flexible equality comparison for data framesTwo-table verbs
24
Nbind_rows() bind_cols() combine()Efficiently bind multiple data frames by row and columnTwo-table verbs
25
Nintersect() union() union_all() setdiff() setequal()Set operationsTwo-table verbs
26
Ninner_join()Join two tbls togetherINNER JOINTwo-table verbs
27
Nleft_join()Join two tbls togetherLEFT JOINTwo-table verbs
28
Nright_join()Join two tbls togetherRIGHT JOINTwo-table verbs
29
Nfull_join()Join two tbls togetherTwo-table verbs
30
Nsemi_join()Join two tbls togetherTwo-table verbs
31
Nanti_join()Join two tbls togetherTwo-table verbs
32
Nauto_copy()Copy tables to same source, if necessaryRemote tables
33
Ncompute() collect() collapse()Force computation of a database queryRemote tables
34
Ncopy_to()Copy a local data frame to a remote srcRemote tables
35
Nident()Flag a character vector as SQL identifiersRemote tables
36
Nexplain() show_query()Explain details of a tblRemote tables
37
Ntbl() is.tbl() as.tbl()Create a table from a data sourceRemote tables
38
Nsrc_mysql() src_postgres() src_sqlite()Source for database backendsRemote tables
39
Nsql()SQL escaping.Remote tables
40
Ngroups() group_vars()Return grouping variablesMetadata
41
Nbetween()Do values in a numeric vector fall in specified range?Vector functions
42
Ncase_when()A general vectorised ifVector functions
43
Ncoalesce()Find first non-missing elementVector functions
44
Ncumall() cumany() cummean()Cumulativate versions of any, all, and meanVector functions
45
Ndesc()Descending orderVector functions
46
Nif_else()Vectorised ifVector functions
47
Nlead() lag()Lead and lag.Vector functions
48
Norder_by()A helper function for ordering window function outputVector functions
49
Nn()The number of observations in the current group.Vector functions
50
Nn_distinct()Efficiently count the number of unique values in a set of vectorVector functions
51
Nna_if()Convert values to NAVector functions
52
Nnear()Compare two numeric vectorsVector functions
53
Nnth() first() last()Extract the first, last or nth value from a vectorVector functions
54
Nrow_number() ntile() min_rank() dense_rank() percent_rank() cume_dist()Windowed rank functions.Vector functions
55
Nrecode() recode_factor()Recode valuesVector functions
56
Ntbl_cube()A data cube tblOther backends
57
Nas.table(<tbl_cube>) as.data.frame(<tbl_cube>) as_data_frame(<tbl_cube>)Coerce a tbl_cube to other data structuresOther backends
58
Nas.tbl_cube()Coerce an existing data structure into a tbl_cubeOther backends
59
Nrowwise()Group input by rowsOther backends