Skip to contents

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 invalid characteristic-unit-fraction-speciation combinations (i.e. user has already run TADA_FlagFraction, TADA_FlagSpeciation, TADA_FlagResultUnit, etc.).

Usage

TADA_GetSynonymRef(.data)

Arguments

.data

TADA dataframe. If a data frame is not provided, the function will return the default internal reference table.

Value

Synonym Reference Table unique to the input dataframe

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 = "invalid_only")
Data_6Tribes_5yClean <- TADA_FlagSpeciation(Data_6Tribes_5yClean, clean = "invalid_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()