What's in a package?

Sometimes we need to view all the functions that are built into an R package. This is done in the same way you would list variables in your workspace, using the ls function. Note that the package must be loaded before you run the ls command.

Usage: Getting a list of functions inside the dplyr package

library(dplyr)
ls("package:dplyr")
##   [1] "%>%"                   "across"                "add_count"            
##   [4] "add_count_"            "add_row"               "add_rownames"         
##   [7] "add_tally"             "add_tally_"            "all_equal"            
##  [10] "all_of"                "all_vars"              "anti_join"            
##  [13] "any_of"                "any_vars"              "arrange"              
##  [16] "arrange_"              "arrange_all"           "arrange_at"           
##  [19] "arrange_if"            "as_data_frame"         "as_label"             
##  [22] "as_tibble"             "as.tbl"                "auto_copy"            
##  [25] "band_instruments"      "band_instruments2"     "band_members"         
##  [28] "bench_tbls"            "between"               "bind_cols"            
##  [31] "bind_rows"             "c_across"              "case_when"            
##  [34] "changes"               "check_dbplyr"          "coalesce"             
##  [37] "collapse"              "collect"               "combine"              
##  [40] "common_by"             "compare_tbls"          "compare_tbls2"        
##  [43] "compute"               "contains"              "copy_to"              
##  [46] "count"                 "count_"                "cumall"               
##  [49] "cumany"                "cume_dist"             "cummean"              
##  [52] "cur_column"            "cur_data"              "cur_data_all"         
##  [55] "cur_group"             "cur_group_id"          "cur_group_rows"       
##  [58] "current_vars"          "data_frame"            "data_frame_"          
##  [61] "db_analyze"            "db_begin"              "db_commit"            
##  [64] "db_create_index"       "db_create_indexes"     "db_create_table"      
##  [67] "db_data_type"          "db_desc"               "db_drop_table"        
##  [70] "db_explain"            "db_has_table"          "db_insert_into"       
##  [73] "db_list_tables"        "db_query_fields"       "db_query_rows"        
##  [76] "db_rollback"           "db_save_query"         "db_write_table"       
##  [79] "dense_rank"            "desc"                  "dim_desc"             
##  [82] "distinct"              "distinct_"             "distinct_all"         
##  [85] "distinct_at"           "distinct_if"           "distinct_prepare"     
##  [88] "do"                    "do_"                   "dplyr_col_modify"     
##  [91] "dplyr_reconstruct"     "dplyr_row_slice"       "ends_with"            
##  [94] "enexpr"                "enexprs"               "enquo"                
##  [97] "enquos"                "ensym"                 "ensyms"               
## [100] "eval_tbls"             "eval_tbls2"            "everything"           
## [103] "explain"               "expr"                  "failwith"             
## [106] "filter"                "filter_"               "filter_all"           
## [109] "filter_at"             "filter_if"             "first"                
## [112] "frame_data"            "full_join"             "funs"                 
## [115] "funs_"                 "glimpse"               "group_by"             
## [118] "group_by_"             "group_by_all"          "group_by_at"          
## [121] "group_by_drop_default" "group_by_if"           "group_by_prepare"     
## [124] "group_cols"            "group_data"            "group_indices"        
## [127] "group_indices_"        "group_keys"            "group_map"            
## [130] "group_modify"          "group_nest"            "group_rows"           
## [133] "group_size"            "group_split"           "group_trim"           
## [136] "group_vars"            "group_walk"            "grouped_df"           
## [139] "groups"                "id"                    "ident"                
## [142] "if_else"               "inner_join"            "intersect"            
## [145] "is_grouped_df"         "is.grouped_df"         "is.src"               
## [148] "is.tbl"                "lag"                   "last"                 
## [151] "last_col"              "lead"                  "left_join"            
## [154] "location"              "lst"                   "lst_"                 
## [157] "make_tbl"              "matches"               "min_rank"             
## [160] "mutate"                "mutate_"               "mutate_all"           
## [163] "mutate_at"             "mutate_each"           "mutate_each_"         
## [166] "mutate_if"             "n"                     "n_distinct"           
## [169] "n_groups"              "na_if"                 "near"                 
## [172] "nest_by"               "nest_join"             "new_grouped_df"       
## [175] "nth"                   "ntile"                 "num_range"            
## [178] "one_of"                "order_by"              "percent_rank"         
## [181] "progress_estimated"    "pull"                  "quo"                  
## [184] "quo_name"              "quos"                  "recode"               
## [187] "recode_factor"         "relocate"              "rename"               
## [190] "rename_"               "rename_all"            "rename_at"            
## [193] "rename_if"             "rename_vars"           "rename_vars_"         
## [196] "rename_with"           "right_join"            "row_number"           
## [199] "rows_delete"           "rows_insert"           "rows_patch"           
## [202] "rows_update"           "rows_upsert"           "rowwise"              
## [205] "same_src"              "sample_frac"           "sample_n"             
## [208] "select"                "select_"               "select_all"           
## [211] "select_at"             "select_if"             "select_var"           
## [214] "select_vars"           "select_vars_"          "semi_join"            
## [217] "setdiff"               "setequal"              "show_query"           
## [220] "slice"                 "slice_"                "slice_head"           
## [223] "slice_max"             "slice_min"             "slice_sample"         
## [226] "slice_tail"            "sql"                   "sql_escape_ident"     
## [229] "sql_escape_string"     "sql_join"              "sql_select"           
## [232] "sql_semi_join"         "sql_set_op"            "sql_subquery"         
## [235] "sql_translate_env"     "src"                   "src_df"               
## [238] "src_local"             "src_mysql"             "src_postgres"         
## [241] "src_sqlite"            "src_tbls"              "starts_with"          
## [244] "starwars"              "storms"                "summarise"            
## [247] "summarise_"            "summarise_all"         "summarise_at"         
## [250] "summarise_each"        "summarise_each_"       "summarise_if"         
## [253] "summarize"             "summarize_"            "summarize_all"        
## [256] "summarize_at"          "summarize_each"        "summarize_each_"      
## [259] "summarize_if"          "sym"                   "syms"                 
## [262] "tally"                 "tally_"                "tbl"                  
## [265] "tbl_df"                "tbl_nongroup_vars"     "tbl_ptype"            
## [268] "tbl_sum"               "tbl_vars"              "tibble"               
## [271] "top_frac"              "top_n"                 "transmute"            
## [274] "transmute_"            "transmute_all"         "transmute_at"         
## [277] "transmute_if"          "tribble"               "trunc_mat"            
## [280] "type_sum"              "ungroup"               "union"                
## [283] "union_all"             "validate_grouped_df"   "vars"                 
## [286] "with_groups"           "with_order"            "wrap_dbplyr_obj"

Related