Generar tabla vacía cuando no haya CNAG y RNA.
This commit is contained in:
+2
-2
@@ -167,13 +167,13 @@ sqlWriteTemp<-function(conn=dta, nhcs=nhc.test, file="queryOV.xlsx", samples.mod
|
||||
if (today==TRUE){
|
||||
cnag.exp$FECHA_ENVIO<-format(Sys.Date(), "%d/%m/%y")
|
||||
}
|
||||
}else{cnag.exp<-NULL}
|
||||
}else{cnag.exp<-sqlFetch(dta, "CNAG") %>% slice(0)}
|
||||
if (any(sapply(nhc.table$Samples, function(x) "rna" %in% strsplit(x,",")[[1]]) == T)){
|
||||
nhcs.rna<-nhc.table[sapply(nhc.table$Samples, function(x) "rna" %in% strsplit(x,",")[[1]]),"NHC"]
|
||||
umid.rna<-sqlFetch(conn, "UMID") %>% filter(NHC %in% nhcs.rna) %>% pull(UMID)
|
||||
sample.rna<-samples.exp %>% filter(UMID %in% umid.rna) %>% pull(CODIGO)
|
||||
rna.exp<-merge(data.frame("UMID"=umid.rna, "CODIGO"=sample.rna), sqlFetch(dta, "RNADNA") %>% slice(0), all=T)
|
||||
}else{rna.exp<-NULL}
|
||||
}else{rna.exp<- sqlFetch(dta, "RNADNA") %>% slice(0)}
|
||||
if (clinics.mod){
|
||||
## Importar los datos clínicos de pacientes existentes y generar nueva entrada par los nuevos
|
||||
upd.clinics<-sqlFetch(conn, "CLINICOS")
|
||||
|
||||
Reference in New Issue
Block a user