This function removes rows where the result value is not numeric to prepare a dataframe for quantitative analyses. Ideally, this function should be run after other data cleaning, QA/QC, and harmonization steps are completed using other TADA package functions, or manually. Specifically, . this function removes rows with "Text" and "NA - Not Available" in the TADA.ResultMeasureValueDataTypes.Flag column, or NA in the TADA.ResultMeasureValue column.
This function removes rows where the result value is not numeric to prepare a dataframe for quantitative analyses. This function can be run after TADA_AutoClean. It removes rows with "Text" and "NA - Not Available" in the TADA.ResultMeasureValueDataTypes.Flag column, or NA in the TADA.ResultMeasureValue column.
Value
.data with rows removed where result values are not quantitative (NA or text), or the results have other issues that are not dealt with elsewhere.
.data with rows removed where result values are not quantitative (NA or text), or the results have other issues that are not dealt with elsewhere.
Details
This function also removes any columns not required for TADA workflow where all values are equal to NA.It also provides a warning message identifying any TADA required columns containing only NA values.
This function also removes any columns not required for TADA workflow where all values are equal to NA. It also provides a warning message identifying any TADA required columns containing only NA values.
Examples
# Load example dataset:
data(Data_Nutrients_UT)
# Remove all:
TADA_filtered <- TADA_AutoFilter(Data_Nutrients_UT)
#> Warning: Censored data should be handled prior to running this function. See ?TADA_SimpleCensoredMethods and ?TADA_IDCensoredData.
#> [1] "Quality control samples have been removed or were not present in the input dataframe. Returning dataframe with TADA.ActivityType.Flag column for tracking."
#> [1] "TADA_Autofilter: removing columns not required for TADA workflow if they contain only NAs."
#> [1] "The following column(s) were removed as they contained only NAs: ActivityDepthAltitudeReferencePointText, ActivityEndDate, ActivityEndTime.Time, ActivityEndTime.TimeZoneCode, SampleAquifer, ResultWeightBasisText, ResultTemperatureBasisText, ResultParticleSizeBasisText, BinaryObjectFileName, BinaryObjectFileTypeCode, LabSamplePreparationUrl and ProjectMonitoringLocationWeightingUrl."
#> [1] "TADA_Autofilter: checking required columns for non-NA values."
#> [1] "TADA Required column(s) SubjectTaxonomicName, SampleTissueAnatomyName, ResultDepthHeightMeasure.MeasureValue, TADA.ResultDepthHeightMeasure.MeasureValue, ResultDepthHeightMeasure.MeasureUnitCode, TADA.ResultDepthHeightMeasure.MeasureUnitCode, ResultDepthAltitudeReferencePointText, ResultTimeBasisText, StatisticalBaseCode, ResultFileUrl, ResultAnalyticalMethod.MethodUrl, DataQuality.PrecisionValue, DataQuality.BiasValue, DataQuality.ConfidenceIntervalValue, DataQuality.UpperConfidenceLimitValue, DataQuality.LowerConfidenceLimitValue, ProjectFileUrl, QAPPApprovalAgencyName and LocalAqfrName contain only NA values. This may impact other TADA functions."
#> [1] "Function removed 3386 results. These results are either text or NA and cannot be plotted or represent quality control activities (not routine samples or measurements)."
# Load example dataset:
data(Data_Nutrients_UT)
# Remove all:
TADA_filtered <- TADA_AutoFilter(Data_Nutrients_UT)
#> Warning: Censored data should be handled prior to running this function. See ?TADA_SimpleCensoredMethods and ?TADA_IDCensoredData.
#> [1] "Quality control samples have been removed or were not present in the input dataframe. Returning dataframe with TADA.ActivityType.Flag column for tracking."
#> [1] "TADA_Autofilter: removing columns not required for TADA workflow if they contain only NAs."
#> [1] "The following column(s) were removed as they contained only NAs: ActivityDepthAltitudeReferencePointText, ActivityEndDate, ActivityEndTime.Time, ActivityEndTime.TimeZoneCode, SampleAquifer, ResultWeightBasisText, ResultTemperatureBasisText, ResultParticleSizeBasisText, BinaryObjectFileName, BinaryObjectFileTypeCode, LabSamplePreparationUrl and ProjectMonitoringLocationWeightingUrl."
#> [1] "TADA_Autofilter: checking required columns for non-NA values."
#> [1] "TADA Required column(s) SubjectTaxonomicName, SampleTissueAnatomyName, ResultDepthHeightMeasure.MeasureValue, TADA.ResultDepthHeightMeasure.MeasureValue, ResultDepthHeightMeasure.MeasureUnitCode, TADA.ResultDepthHeightMeasure.MeasureUnitCode, ResultDepthAltitudeReferencePointText, ResultTimeBasisText, StatisticalBaseCode, ResultFileUrl, ResultAnalyticalMethod.MethodUrl, DataQuality.PrecisionValue, DataQuality.BiasValue, DataQuality.ConfidenceIntervalValue, DataQuality.UpperConfidenceLimitValue, DataQuality.LowerConfidenceLimitValue, ProjectFileUrl, QAPPApprovalAgencyName and LocalAqfrName contain only NA values. This may impact other TADA functions."
#> [1] "Function removed 3386 results. These results are either text or NA and cannot be plotted or represent quality control activities (not routine samples or measurements)."