Learn R Programming

safetyGraphics (version 2.0.0)

hasField: Check whether a specified field value is found in a data set

Description

This checks whether a specific value is found in a specified column in a specified data set

Usage

hasField(fieldValue, columnName, data)

Arguments

fieldValue

A value to check for.

columnName

The column to check.

data

the data.frame to search.

Value

logical scalar. TRUE if field_value is found. FALSE otherwise

Examples

Run this code
# NOT RUN {
#TRUE
safetyGraphics:::hasField(
 fieldValue="Bilirubin (umol/L)",
 columnName="PARAM",
 data=safetyData::adam_adlbc
)

#FALSE
safetyGraphics:::hasField(
 fieldValue="Not_a_real_value",
 columnName="",
 data=safetyData::adam_adlbc
)

# }

Run the code above in your browser using DataLab