fn_search_vardefs: fn_search_vardefs

View source: R/utils.R

fn_search_vardefsR Documentation

fn_search_vardefs

Description

Retrieve variable or property data from RomDataSource$propvalues() or RomProperty$propvalues() style data frame provided by user. Original intended use is to search local variable definitions for a provided hydroid or varkey, but may apply to any propvalues() style dataframe that has a hydroid primary key field

Usage

fn_search_vardefs(config, var_defs_tmp)

Arguments

config

A list that contains either a target dh_variabledefinition hydroid or varkey. The varkey is given preference. Hydroids from other tables (dh_properties) may be provided but user must provide appropriate table in var_defs_tmp Definitions for these items are defined in the hydrotools readme.

var_defs_tmp

data frame to search, often those of variable definitions with hydroid and varkeys at least, but may also be a similar table from dh_properties or other table maybe generated through RomProperty$propvalues()

Value

data frame subset from var_defs_tmp based on the hydroid or varkey provided by user. Returns FALSE if nothing found

Examples

NA
#ds <- RomDataSource$new()
#fn_search_vardefs(config = list(hydroid = 1456),)

HARPgroup/hydro-tools documentation built on July 4, 2025, 11:05 a.m.