-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Example missing sample check from TCTN, fill in with analyte-specific column names:
# 5. Check with Metadata for missing:
source("./Processing_Scripts/Metadata_kit_list.R")
metadata_collected %>%
filter(sample_method == "jar", transect_location != "sediment") -> meta_filter
data_clean %>%
full_join(meta_filter, by = c("campaign", "kit_id", "transect_location")) %>%
# add rows for samples not collected, creating a "full" dataset of all possible samples
mutate(tc_flag = case_when(collected == FALSE & is.na(carbon_weight_perc) & is.na(tc_flag) ~ "sample not collected",
notes == "kit compromised" ~ "kit compromised",
notes == "sample compromised" ~ "sample compromised",
TRUE ~ tc_flag),
tn_flag = case_when(collected == FALSE & is.na(nitrogen_weight_perc) & is.na(tn_flag) ~ "sample not collected",
notes == "kit compromised" ~ "kit compromised",
notes == "sample compromised" ~ "sample compromised",
TRUE ~ tn_flag),
carbon_weight_perc = case_when(notes == "kit compromised" ~ NA,
notes == "sample compromised" ~ NA,
TRUE ~ carbon_weight_perc),
nitrogen_weight_perc = case_when(notes == "kit compromised" ~ NA,
notes == "sample compromised" ~ NA,
TRUE ~ nitrogen_weight_perc)) %>%
select(-c(sample_type, sample_method, collected, notes)) -> tctn_full
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation