byIDfromList: Retrieves an object from a list based on it's 'id' slot

View source: R/byIDfromList.R

byIDfromListR Documentation

Retrieves an object from a list based on it's id slot

Description

Looks through a list of arbitary object until it finds one which has a slot called "id" whose value matches the imput argument. The idea is that you can use this function to pull a particular Layer from a list of Layer objects, or a particular run from a list of Source objects etc.

Usage

byIDfromList(id, list)

Arguments

id

The id sought (must be string)

list

The list to be scanned (must be a list)

Value

The matching object from the list or NULL. If NULL it will give a message and a warning, the following code will probably fail.

Author(s)

Matthew Forrest matthew.forrest@senckenberg.de


MagicForrest/DGVMTools documentation built on Aug. 23, 2024, 8:05 a.m.