Skip to content

Commit 65fd5a8

Browse files
author
Compagnoni
committed
Format structure_type_ as character
1 parent 1831121 commit 65fd5a8

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

‎R/util.R‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,19 @@ pplr_summary <- function(limit = 10, offset = 0, ...) {
173173
#' pplr_search(proj_metadata_key = 13, verbose = TRUE)
174174
pplr_search <- function(proj_metadata_key, limit = 10, offset = 0, ...) {
175175
args <- list(proj_metadata_key = proj_metadata_key,
176-
limit = limit, offset = offset)
177-
pop_GET("search", args, ...)
176+
limit = limit, offset = offset)
177+
178+
# get the data
179+
ds_out <- pop_GET("search", args, ...)
180+
181+
# format structure_type_ columns
182+
ds_out$data$structure_type_1 <- as.character(ds_out$data$structure_type_1)
183+
ds_out$data$structure_type_2 <- as.character(ds_out$data$structure_type_2)
184+
ds_out$data$structure_type_3 <- as.character(ds_out$data$structure_type_3)
185+
ds_out$data$structure_type_4 <- as.character(ds_out$data$structure_type_4)
186+
187+
ds_out
188+
178189
}
179190

180191
#' @noRd

0 commit comments

Comments
 (0)