From 9d044f2997e5a04da026fec1dc72f53bf427f0f0 Mon Sep 17 00:00:00 2001 From: Kevin See Date: Wed, 16 Aug 2023 14:15:17 -0700 Subject: [PATCH] cleaned up some redundant code --- R/queryTagMeta.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R/queryTagMeta.R b/R/queryTagMeta.R index c81b4b3..134692a 100644 --- a/R/queryTagMeta.R +++ b/R/queryTagMeta.R @@ -55,9 +55,10 @@ queryTagMeta = function(tag_code = NULL, task = 'query data from PTAGIS') # parse the response + parsed = httr::content(web_req, + 'parsed') + if(!is.na(type)) { - parsed = httr::content(web_req, - 'parsed') if(length(parsed[[1]]) == 1) { parsed <- parsed %>% stack() %>% @@ -93,8 +94,7 @@ queryTagMeta = function(tag_code = NULL, } } else { - parsed <- httr::content(web_req, - 'parsed') %>% + parsed <- parsed %>% map(.f = function(x) { x %>% stack() %>%