Skip to content

Commit

Permalink
Merge pull request #6 from addelany/main
Browse files Browse the repository at this point in the history
Update build_collection.R
  • Loading branch information
rqthomas authored Oct 23, 2023
2 parents f7a7f2c + 545dbb7 commit 3a5f767
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions R/build_collection.R
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,25 @@ build_table_columns <- function(data_object,description_df){
return(init_list)
}

build_table_columns_full_bucket <- function(data_object,description_df){

full_string_list <- strsplit(data_object$ToString(),'\n')[[1]]

#create initial empty list
init_list = vector(mode="list", length = data_object[[1]]$num_cols)

## loop through parquet df and description information to build the list
for (i in seq.int(1,data_object$num_cols)){
list_items <- strsplit(full_string_list[i],': ')[[1]]
col_list <- list(name = list_items[1],
type = list_items[2],
description = description_df[1,list_items[1]])

init_list[[i]] <- col_list

}
return(init_list)
}

#' Build publication object for collection
#'
Expand Down

0 comments on commit 3a5f767

Please sign in to comment.