Skip to content

Commit

Permalink
Merge pull request #52 from finddx/featureOSDates
Browse files Browse the repository at this point in the history
rm all na cols
  • Loading branch information
m-mburu authored Aug 8, 2024
2 parents abe837f + 5631958 commit 9565b28
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion R/get_bulk_query.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ get_bulk_query <- function(auth_response,

# Remove 0 column DFs
results_list <- results_list[sapply(results_list, function(x) !is.null(x))]

#findBiobankR::rm_all_na_col
#results_list <- lapply(results_list, findBiobankR::rm_all_na_col)
# Return the results as a single data frame
df_results = data.table::rbindlist(results_list, fill = T)

Expand Down
2 changes: 1 addition & 1 deletion R/parse_os_response.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ parse_os_response <- function(response, parse_data_function, skip_date_convertio

if(inherits(df, "data.frame") & !skip_date_convertion){

df = rm_all_na_col(df)
df = timestamp_to_date(df, ...)

}
Expand Down
5 changes: 3 additions & 2 deletions dev/OpenSpecimenAPI.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ parse_os_response <- function(response, parse_data_function, skip_date_convertio
if(inherits(df, "data.frame") & !skip_date_convertion){
df = rm_all_na_col(df)
df = timestamp_to_date(df, ...)
}
Expand Down Expand Up @@ -582,7 +582,8 @@ get_bulk_query <- function(auth_response,
# Remove 0 column DFs
results_list <- results_list[sapply(results_list, function(x) !is.null(x))]
#findBiobankR::rm_all_na_col
#results_list <- lapply(results_list, findBiobankR::rm_all_na_col)
# Return the results as a single data frame
df_results = data.table::rbindlist(results_list, fill = T)
Expand Down

0 comments on commit 9565b28

Please sign in to comment.