Skip to contents

Function checks data submitted under the "ProjectFileUrl" column to determine if a QAPP document is available to review. When clean = FALSE, a column will be appended to flag results that have an associated QAPP document URL provided. When clean = TRUE, rows that do not have an associated QAPP document are removed from the dataframe and no column will be appended. This function should only be used to remove data if an accompanying QAPP document is required to use data in assessments.

Usage

TADA_FindQAPPDoc(.data, clean = FALSE)

Arguments

.data

TADA dataframe

clean

Boolean argument; removes data without an associated QAPP document from the dataframe when clean = TRUE. Default is clean = FALSE.

Value

Returns input dataframe with the added "TADA.QAPPDocAvailable" column. When clean = FALSE, no data are removed and the TADA.QAPPDocAvailable column flags rows with an associated QAPP document. When clean = TRUE, data without an associated QAPP document are removed from the dataframe.

Examples

# Load example dataset:
data(Data_Nutrients_UT)

# Flag, but do not remove, data without an associated QAPP document in
# new column titled "TADA.QAPPDocAvailable":
FlagData_MissingQAPPDocURLs <- TADA_FindQAPPDoc(Data_Nutrients_UT)
#> [1] "No QAPP document url data found in your dataframe. Returning input dataframe with TADA.QAPPDocAvailable column for tracking."

# Remove data without an associated QAPP document available:
RemoveData_MissingQAPPDocURLs <- TADA_FindQAPPDoc(Data_Nutrients_UT, clean = TRUE)
#> [1] "This dataframe is empty because we did not find any QAPP document url data in your dataframe"