-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Use case (from Ben): user wants a flat table of just columns from Site and Library tables.
Proposed implementation:
- get_df to get tables requested
- make_complete ()
sidora.core/R/dataprep_join_data.R
Lines 127 to 148 in 1a6088b
#' Make sequence-complete Pandora table list #' #' Pandoras layout is a hierarchical sequence of tables: All tables have a clear #' predecessor and successor. \code{join_pandora_tables()} uses this fact to #' merge tables accordingly. \code{make_complete_table_list} is #' a helper function to fill the gaps in a sequence of Pandora tables. #' #' @param tabs character vector. List of Pandora table names #' @param join_order_vector character vector. Reference vector with the Pandora #' structure #' #' @export make_complete_table_list <- function( tabs, join_order_vector = sidora.core::pandora_tables ) { positions <- sapply(tabs, function(x) { which(x == join_order_vector) }) res <- join_order_vector[seq(min(positions), max(positions), 1)] return(res) } - allow make_complete to fill in the gaps
- New functionality: if not sequential tables requested, remove the columns from 'intemrediate' tables filled in by make_complete before returning (in case above, e.g. psuedocode: `select_if(-starts_with("sample", "individual", "extract")
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request