validate by one analyst: confirm there are precisely the columns used across all analyses
@softloud is already working on this.
Since Jan 15, 2026.
Assessment
This issue has not been assessed yet.
Description
Debug why this validation doesn't work -- probably time to #55
This code will be less complex without carrying the column index.
# scratchpad validation
# validate_analysts
# source_dat <- targets::tar_read(dat_eucalyptus)
# source_column_index <- targets::tar_read(column_index_eucalyptus)
# analysts <- targets::tar_read(analysts_eucalyptus)
# set.seed(45)
get_validate_analysts <- function(dat, source_column_index, analysts) {
message("select an analyst to validate")
analyst_sample <-
analysts |>
dplyr::filter(n_analyses > 1) |>
dplyr::sample_n(1)
message("analyst ID: ")
message(analyst_sample$analyst_id)
message("number of analyses conducted: ")
message(analyst_sample$n_analyses)
source_dat_rows <-
dat |>
dplyr::filter(analyst_id == analyst_sample$analyst_id)
message("check the number of rows in the source data
is the same as the number of analyses recorded")
message(nrow(source_dat_rows) == analyst_sample$n_analyses)
# select the columns that are not all NA
source_dat_cols <- source_dat_rows |>
dplyr::select(
where(~!all(is.na(.)))
) |>
colnames()
# match the column indexes to the source columns
# and extract
identified_cols <- tibble::tibble(
col_index = analyst_sample |> dplyr::pull(source_cols) |> unlist()
) |>
dplyr::left_join(
source_column_index,
by = "col_index"
) |>
dplyr::pull(col_name)
message("check the source columns identified match those in the source data")
# exclude first 6 metadata columns
message(all(sort(identified_cols) == sort(source_dat_cols[-c(1:6)])))
}
- Dominant language
- HTML
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from softloud/questionability
-
softloud/questionability#226 · 1 assignee ·
-
Difficulty 3/5 1-2 days Newbie friendliness 50/100
softloud/questionability#223 ·
-
exclude Bugonia? Open
Difficulty 3/5 1-2 days Newbie friendliness 20/100
softloud/questionability#219 ·
-
agenda
softloud/questionability#218 · 1 comment · 1 assignee ·
-
softloud/questionability#215 · 1 assignee ·