-
Notifications
You must be signed in to change notification settings - Fork 14
Files
/
Copy path11-dplyr_sql_summary_table.tsv
Latest commit
59 lines (59 loc) · 4.76 KB
/
11-dplyr_sql_summary_table.tsv
1 | In | Dplyr_Function | description | SQL_Clause | Notes | Category |
---|---|---|---|---|---|---|
2 | Y | arrange() | Arrange rows by variables | ORDER BY | Basic single-table verbs | |
3 | Y? | distinct() | Return rows with matching conditions | SELECT distinct * | Basic single-table verbs | |
4 | Y | select() rename() | Select/rename variables by name | SELECT column_name alias_name | Basic single-table verbs | |
5 | N | pull() | Pull out a single variable | SELECT column_name; | Basic single-table verbs | |
6 | Y | mutate() transmute() | Add new variables | SELECT computed_value computed_name | Basic single-table verbs | |
7 | Y | summarise() summarize() | Reduces multiple values down to a single value | SELECT aggregate_functions GROUP BY | Basic single-table verbs | |
8 | N | group_by() ungroup() | Objects exported from other packages | GROUP BY no ungroup | Basic single-table verbs | |
9 | N | distinct() | Select distinct/unique rows | SELECT distinct {colname1,...colnamen} | Basic single-table verbs | |
10 | N | do() | Do anything | NA | Basic single-table verbs | |
11 | N | sample_n() sample_frac() | Sample n rows from a table | ORDER BY RANDOM() LIMIT 10 | Basic single-table verbs | |
12 | N | slice() | Select rows by position | SELECT row_number() over (partition by expression(s) order_by exp) | Basic single-table verbs | |
13 | Y | tally() count() add_tally() add_count() | Count/tally observations by group | GROUP BY | Single-table helpers | |
14 | Y | top_n() | Select top (or bottom) n rows (by value) | ORDER BY VALUE {DESC} LIMIT 10 | Single-table helpers | |
15 | N | arrange_all() arrange_at() arrange_if() | Arrange rows by a selection of variables | ORDER BY | scoped-Operate on a selection of variables | |
16 | N | filter_all() filter_if() filter_at() | Filter within a selection of variables | WHERE | scoped-Operate on a selection of variables | |
17 | N | group_by_all() group_by_at() group_by_if() | Group by a selection of variables | GROUP BY | scoped-Operate on a selection of variables | |
18 | N | select_* | Select and rename a selection of variables | AS | scoped-Operate on a selection of variables | |
19 | N | summarise_*() | Summarise and mutate multiple columns. | scoped-Operate on a selection of variables | ||
20 | N | all_vars() any_vars() | Apply predicate to all variables | scoped-Operate on a selection of variables | ||
21 | N | vars() | Select variables | scoped-Operate on a selection of variables | ||
22 | N | funs() | Create a list of functions calls. | scoped-Operate on a selection of variables | ||
23 | N | all_equal() all.equal(<tbl_df>) | Flexible equality comparison for data frames | Two-table verbs | ||
24 | N | bind_rows() bind_cols() combine() | Efficiently bind multiple data frames by row and column | Two-table verbs | ||
25 | N | intersect() union() union_all() setdiff() setequal() | Set operations | Two-table verbs | ||
26 | N | inner_join() | Join two tbls together | INNER JOIN | Two-table verbs | |
27 | N | left_join() | Join two tbls together | LEFT JOIN | Two-table verbs | |
28 | N | right_join() | Join two tbls together | RIGHT JOIN | Two-table verbs | |
29 | N | full_join() | Join two tbls together | Two-table verbs | ||
30 | N | semi_join() | Join two tbls together | Two-table verbs | ||
31 | N | anti_join() | Join two tbls together | Two-table verbs | ||
32 | N | auto_copy() | Copy tables to same source, if necessary | Remote tables | ||
33 | N | compute() collect() collapse() | Force computation of a database query | Remote tables | ||
34 | N | copy_to() | Copy a local data frame to a remote src | Remote tables | ||
35 | N | ident() | Flag a character vector as SQL identifiers | Remote tables | ||
36 | N | explain() show_query() | Explain details of a tbl | Remote tables | ||
37 | N | tbl() is.tbl() as.tbl() | Create a table from a data source | Remote tables | ||
38 | N | src_mysql() src_postgres() src_sqlite() | Source for database backends | Remote tables | ||
39 | N | sql() | SQL escaping. | Remote tables | ||
40 | N | groups() group_vars() | Return grouping variables | Metadata | ||
41 | N | between() | Do values in a numeric vector fall in specified range? | Vector functions | ||
42 | N | case_when() | A general vectorised if | Vector functions | ||
43 | N | coalesce() | Find first non-missing element | Vector functions | ||
44 | N | cumall() cumany() cummean() | Cumulativate versions of any, all, and mean | Vector functions | ||
45 | N | desc() | Descending order | Vector functions | ||
46 | N | if_else() | Vectorised if | Vector functions | ||
47 | N | lead() lag() | Lead and lag. | Vector functions | ||
48 | N | order_by() | A helper function for ordering window function output | Vector functions | ||
49 | N | n() | The number of observations in the current group. | Vector functions | ||
50 | N | n_distinct() | Efficiently count the number of unique values in a set of vector | Vector functions | ||
51 | N | na_if() | Convert values to NA | Vector functions | ||
52 | N | near() | Compare two numeric vectors | Vector functions | ||
53 | N | nth() first() last() | Extract the first, last or nth value from a vector | Vector functions | ||
54 | N | row_number() ntile() min_rank() dense_rank() percent_rank() cume_dist() | Windowed rank functions. | Vector functions | ||
55 | N | recode() recode_factor() | Recode values | Vector functions | ||
56 | N | tbl_cube() | A data cube tbl | Other backends | ||
57 | N | as.table(<tbl_cube>) as.data.frame(<tbl_cube>) as_data_frame(<tbl_cube>) | Coerce a tbl_cube to other data structures | Other backends | ||
58 | N | as.tbl_cube() | Coerce an existing data structure into a tbl_cube | Other backends | ||
59 | N | rowwise() | Group input by rows | Other backends |