Skip to contents

Returns a named logical vector indicating which hydroloom functions can operate on the input object given its current class and columns.

Functions marked TRUE are directly callable. Use include_conversions = TRUE to see what becomes available after a single representation conversion.

Usage

hy_capabilities(x, include_conversions = FALSE)

Arguments

x

object to query.

include_conversions

logical. If TRUE, also marks functions reachable via a single representation conversion.

Value

named logical vector.

Examples

x <- sf::read_sf(system.file("extdata/new_hope.gpkg", package = "hydroloom"))
hy_capabilities(hy(x))
#>                     add_toids            make_node_topology 
#>                          TRUE                         FALSE 
#>                to_flownetwork                  sort_network 
#>                         FALSE                         FALSE 
#>                 add_topo_sort                add_levelpaths 
#>                         FALSE                         FALSE 
#>                add_pathlength               add_streamorder 
#>                         FALSE                         FALSE 
#>         accumulate_downstream                check_hy_graph 
#>                         FALSE                         FALSE 
#>        navigate_hydro_network               add_pfafstetter 
#>                         FALSE                         FALSE 
#>               add_streamlevel                add_divergence 
#>                         FALSE                          TRUE 
#>         add_return_divergence                subset_network 
#>                          TRUE                          TRUE 
#>          navigate_network_dfs                make_index_ids 
#>                         FALSE                         FALSE 
#>       make_attribute_topology         index_points_to_lines 
#>                          TRUE                          TRUE 
#>               get_confluences   add_hydro_location_distance 
#>                          TRUE                          TRUE 
#> index_hydro_location_distance                   get_subpath 
#>                          TRUE                          TRUE