From faffd135248241dadd45a6af5bd6322b81c1a248 Mon Sep 17 00:00:00 2001 From: marcelcosta Date: Wed, 22 Nov 2023 15:50:29 +0100 Subject: [PATCH] =?UTF-8?q?Correcci=C3=B3n=20bug=20al=20incorporar=20nuevo?= =?UTF-8?q?=20PATID=20en=20CC.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sqlFunctions.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlFunctions.R b/sqlFunctions.R index 3806d30..bf434d2 100644 --- a/sqlFunctions.R +++ b/sqlFunctions.R @@ -82,7 +82,7 @@ sqlGenOVID<-function(conn=dta, nhcs=nhc.test, verb=T, sinc=F, dbtype=NULL){ if(length(new.nhc) > 0){ if (nrow(dbid) == 0){next.num<-1}else{ - next.num<-gsub(db["dbcode"],"",dbid[,db["dbcode"]]) %>% as.numeric %>% max(na.rm=T)+1 + next.num<-gsub(db["dbpref"],"",dbid[,db["dbcode"]]) %>% as.numeric %>% max(na.rm=T)+1 } print(next.num) last.num<-next.num+(length(new.nhc)-1)