From 766fe1f4d45f7d2aef2b646c9a41c0ff0ec47ad7 Mon Sep 17 00:00:00 2001 From: del Carpio Huerta Date: Mon, 28 Feb 2022 16:05:48 +0100 Subject: [PATCH] =?UTF-8?q?Error=20en=20la=20funci=C3=B3n=20de=20llenar=20?= =?UTF-8?q?la=20plantilla.?= 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 f5c8cea..745bdec 100644 --- a/sqlFunctions.R +++ b/sqlFunctions.R @@ -150,7 +150,7 @@ sqlWriteTemp<-function(conn=dta, nhcs=nhc.test, file="queryOV.xlsx", samples.mod } last.samp<-next.samp+(length(nhcs)-1) new.samp<-sprintf("UM%s%02d",Sys.time() %>% format("%y"),next.samp:last.samp) - new.samp.df<-merge(sqlFetch(dta,"UMID") %>% merge(data.frame("NHC"=nhcs)), data.frame("NHC"=nhcs, "CODIGO"=new.samp)) + new.samp.df<-data.frame("NHC"=nhcs, "CODIGO"=new.samp) %>% merge(sqlFetch(dta,"UMID")) %>% arrange(CODIGO) samples.exp<-merge(samples %>% slice(0), new.samp.df %>% select(-NHC), all=T) %>% select(colnames(samples)) %>% arrange(CODIGO) }