summarise()
, left_join()
, inner_join()
, full_join()
select()
, mutate()
filter()
, semi_join()
, anti_join()
arrange()
, group_by()
gather()
and spread()
summarise()
new_var_name =
reduction_verb(...)
stderr = sd(sqrt(var) / n())
tally()
is a shortcut for summarise(n = n())
left_join()
- there will be at least one case in the output for every case in the left table. Output includes all vars.inner_join()
- output has only cases in left table that have a match in right table. Output includes all vars.full_join()
- contains all cases from both left and right table. For any cases that don’t have a match in the other table, NA
is inserted as the value for the variable for the vars from the other table.mutate()
new_var_name =
transformation_verb(...)
frac =
/(count, sum(count))
1transmute()
is similar, but drops all variables other than those created.select()
new_var = old_var
rename()
works the same but does not throw away any columnsgroup_by()
arrange()
— sometimes with `desc().
filter()
semi_join()
- filters the left-table input to include only those with a match in the right table. Output includes only left-table vars.anti_join()
is same as semi_join()
but the filter is for those cases without a match in the right table. Output includes only left-table vars.gather()
and spread()
More naturally written as frac = count / sum(count)
↩