check_field_exists | R Documentation |
Check if a field exists in data and warn if it doesn't, then return the field value
check_field_exists(
data,
field_name,
class_name,
context = NULL,
default_value = NA
)
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) |
The field value if it exists, otherwise the default_value
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.