check_graphab_object: Check whether a Graphab object exists in the Graphab project.

View source: R/check_graphab_object.R

check_graphab_objectR Documentation

Check whether a Graphab object exists in the Graphab project.

Description

The function checks whether a given object exists in the Graphab project. This can be a habitat, a linkset or a graph.

Usage

check_graphab_object(proj_path, object_type, name)

Arguments

proj_path

The path to the project .xml file.

object_type

A character string with the name of the object type whose list will be checked. Can be either "habitat", "linkset", or "graph".

name

A character string (or vector) with the name(s) of the object(s) whose existence is checked.

Value

A logical specifying whether the object exists.

Author(s)

P. Savary

Examples

## Not run: 
proj_end_path <- "./graphab_example/graphab_example.xml"
check_graphab_object(proj_path = proj_end_path,
                     object_type = "habitat",
                     name = "forest")

## End(Not run)

graph4lg documentation built on Sept. 24, 2026, 5:12 p.m.