This function returns a character vector listing all the functions available in the specified R package. It first checks if the package is installed and can be loaded; if not, it raises an error.
Examples
str(package_functions(package = "raster"))
#> chr [1:281] "%in%" "Arith" "Compare" "Geary" "GearyLocal" "KML" "Logic" ...
str(package_functions(package = "sf"))
#> chr [1:156] "%>%" "FULL_bbox_" "NA_agr_" "NA_bbox_" "NA_crs_" ...
package_functions(package = "ecokit")
#> [1] "%>%" "add_cross_to_grid" "add_diagonals_to_grid"
#> [4] "add_image_to_plot" "add_line" "add_missing_columns"
#> [7] "all_objects_sizes" "arrange_alphanum" "assign_env_vars"
#> [10] "assign_if_not_exist" "bash_variables" "boundary_to_wkt"
#> [13] "cat_diff" "cat_names" "cat_sep"
#> [16] "cat_time" "cc" "check_args"
#> [19] "check_data" "check_feather" "check_gbif"
#> [22] "check_image" "check_qs" "check_quarto"
#> [25] "check_rdata" "check_rds" "check_rstudio"
#> [28] "check_stack_in_memory" "check_system_command" "check_tiff"
#> [31] "check_url" "check_zip" "chelsa_var_info"
#> [34] "clear_console" "clip_raster_by_polygon" "detect_alias"
#> [37] "dir_size" "file_extension" "file_size"
#> [40] "file_type" "function_arguments" "get_chelsa_links"
#> [43] "get_mode" "git_log" "ht"
#> [46] "info_chunk" "integer_breaks" "keep_only"
#> [49] "lapply_" "list_to_rdata" "load_as"
#> [52] "load_multiple" "load_packages" "load_packages_future"
#> [55] "loaded_packages" "n_decimals" "n_unique"
#> [58] "nc_global_attributes" "normalize_path" "os"
#> [61] "package_functions" "package_remote_sha" "polygon_centroid"
#> [64] "quiet_device" "range_to_new_value" "raster_to_pres_abs"
#> [67] "record_arguments" "reload_package" "rename_geometry"
#> [70] "replace_space" "sapply_" "save_as"
#> [73] "save_multiple" "save_session" "save_session_info"
#> [76] "scale_0_1" "scrape_link" "script_location"
#> [79] "set_geometry" "set_parallel" "set_raster_crs"
#> [82] "sf_add_coords" "source_silent" "split_df_to_chunks"
#> [85] "split_raster" "split_vector" "stop_ctx"
#> [88] "system_command" "text_to_coordinates" "tibble_column_size"
#> [91] "used_packages"
if (FALSE) { # \dontrun{
# Error: package not found
package_functions(package = "non_exist")
} # }