Skip to content

Commit

Permalink
Add K024 note and set all compromised samples to NA
Browse files Browse the repository at this point in the history
  • Loading branch information
stephpenn1 committed Feb 29, 2024
1 parent 21f3973 commit 25ae36b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Processing_Scripts/soil_cec.R
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,15 @@ metadata_collected %>%

data_clean %>%
full_join(meta_filter, by = c("campaign", "kit_id", "transect_location")) %>%
mutate(notes = case_when(kit_id == "K050" & transect_location == "upland" ~ "not enough material for extraction"#,
TRUE ~ notes),
#across(is.numeric & kit_id == "K001", NA)
) -> full
mutate(notes = case_when(kit_id == "K050" & transect_location == "upland" ~ "not enough material for extraction",
kit_id == "K024" & transect_location == "wetland" ~ "sample compromised",
TRUE ~ notes)) -> full

nums <- sapply(full, is.numeric) # identify numeric columns
full[!is.na(full$notes), which(nums)] <- NA # set compromised kits to NA

#
# 12. Write L0B data -----------------------------------------------------------
# 13. Write L0B data -----------------------------------------------------------
write_csv(cations_and_cec, paste0("Data/Processed/EC1_Soil_ICP_CEC_L0B_", Sys.Date(), ".csv"))


Expand Down

0 comments on commit 25ae36b

Please sign in to comment.