check_field_exists {rmzqc} | R Documentation |
Check if a field exists in data and warn if it doesn't, then return the field value
Description
Check if a field exists in data and warn if it doesn't, then return the field value
Usage
check_field_exists(
data,
field_name,
class_name,
context = NULL,
default_value = NA
)
Arguments
data |
The data structure to check |
field_name |
The name of the field to check for |
class_name |
The name of the class being populated |
context |
Optional context information for the warning message |
default_value |
Value to return if the field doesn't exist (default: NA) |
Value
The field value if it exists, otherwise the default_value
[Package rmzqc version 0.7.0 Index]