From 94383242dd3de3e561a380adf6ec92e76e84ad9b Mon Sep 17 00:00:00 2001 From: Andreas Gammelgaard Damsbo Date: Tue, 9 Jan 2024 11:06:31 +0100 Subject: [PATCH] remove duplicated line --- R/read_redcap_tables.R | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/R/read_redcap_tables.R b/R/read_redcap_tables.R index 7a4ae26..a9f9e62 100644 --- a/R/read_redcap_tables.R +++ b/R/read_redcap_tables.R @@ -40,7 +40,9 @@ read_redcap_tables <- function(uri, )) { - m <- REDCapR::redcap_metadata_read(redcap_uri = uri, token = token)[["data"]] + # Getting metadata + m <- + REDCapR::redcap_metadata_read (redcap_uri = uri, token = token)[["data"]] if (!is.null(fields)){ @@ -93,11 +95,7 @@ read_redcap_tables <- function(uri, d$redcap_repeat_instrument <- clean_redcap_name(d$redcap_repeat_instrument) } - # Getting metadata - m <- - REDCapR::redcap_metadata_read (redcap_uri = uri, token = token)[["data"]] - - # Processing metadata to reflect dataset + # Processing metadata to reflect focused dataset if (!is.null(c(fields,forms,events))){ m <- focused_metadata(m,names(d)) }