From b7e0873b003d29d74e9456924c8f8a4fcbe0a6e0 Mon Sep 17 00:00:00 2001 From: Andreas Gammelgaard Damsbo Date: Wed, 20 Nov 2024 12:09:30 +0100 Subject: [PATCH] better handling intrument export --- R/export_redcap_instrument.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/export_redcap_instrument.R b/R/export_redcap_instrument.R index ca665f1..e5b7b98 100644 --- a/R/export_redcap_instrument.R +++ b/R/export_redcap_instrument.R @@ -48,7 +48,7 @@ export_redcap_instrument <- function(data, ideas on exporting multiple instruments.") } - if (record.id %in% data[["field_name"]]){ + if (!is.na(record.id) && record.id %in% data[["field_name"]]){ data <- data[-match(record.id,data[["field_name"]]),] }