Solutions

List subsetting challenge

xlist$b[2]
## [1] 2
xlist[[2]][2]
## [1] 2
xlist[["b"]][2]
## [1] 2

Finding column name matches in two tables

names(individual)[names(individual) %in% names(maptag)]
## [1] "uid"          "eventID"      "individualID"

dataspice mega challenge!

variables <- readr::read_csv(here::here("data-raw", "wood-survey-data-master",
                                        "NEON_vst_variables.csv"),
                             col_types = readr::cols(.default = "c")) %>% 
    dplyr::mutate(fieldName = janitor::make_clean_names(fieldName)) %>%
    select(fieldName, description, units)
attributes <- readr::read_csv(here::here("data", "metadata", "attributes.csv")) %>% 
    select(-description, -unitText)
## Rows: 32 Columns: 4
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (2): fileName, variableName
## lgl (2): description, unitText
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
dplyr::left_join(attributes, variables, by = c("variableName" = "fieldName")) %>%
    dplyr::rename(unitText = "units") %>%
    readr::write_csv(here::here("data", "metadata", "attributes.csv"))
edit_attributes()