Function generates a synonym reference table containing all unique combinations of TADA.CharacteristicName, TADA.ResultSampleFractionText, and TADA.MethodSpeciationName. The function also joins in some TADA-specific suggested synonyms for nutrients and priority parameters. These target synonyms (denoted in the reference table with the prefix "Target.") are intended to help the user aggregate synonymous data that may be uploaded with slightly different metadata conventions and prepare nutrient data for total N and P summations. Users can review how their input data relates to target synonyms for TADA.CharacteristicName, TADA.ResultSampleFractionText, and TADA.MethodSpeciationName. Once the synonym table is created, users may optionally edit the target columns in the reference table to meet their needs. Additionally, the function assumes the user has already removed any data containing suspect characteristic-unit-fraction-speciation combinations (i.e. user has already run TADA_FlagFraction, TADA_FlagSpeciation, TADA_FlagResultUnit, etc.).
Examples
# Load example dataset:
data(Data_6Tribes_5y)
# Create a synonym reference table for flagged, cleaned dataframe:
Data_6Tribes_5yClean <- subset(Data_6Tribes_5y, !is.na(Data_6Tribes_5y$TADA.ResultMeasureValue))
Data_6Tribes_5yClean <- TADA_FlagFraction(Data_6Tribes_5yClean, clean = TRUE)
Data_6Tribes_5yClean <- TADA_FlagResultUnit(Data_6Tribes_5yClean, clean = "suspect_only")
Data_6Tribes_5yClean <- TADA_FlagSpeciation(Data_6Tribes_5yClean, clean = "suspect_only")
Data_6Tribes_5yClean <- TADA_FlagMethod(Data_6Tribes_5yClean, clean = TRUE)
CreateRefTable <- TADA_GetSynonymRef(Data_6Tribes_5yClean)
# Get internal synonym reference table
reference <- TADA_GetSynonymRef()