Browse Source

Solucionar error cuando el NHC está duplicado.

main
del Carpio Huerta 2 years ago
parent
commit
2e4f3416e6
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      sqlFunctions.R

+ 1
- 1
sqlFunctions.R

@ -54,7 +54,7 @@ sqlShowSamples<-function(conn=dta, nhcs=nhc.test, verb=F, dbtype=NULL){
if (isFALSE(verb)){ if (isFALSE(verb)){
sqlQuery(conn, query) %>% filter(NHC %in% nhcs) %>% sqlQuery(conn, query) %>% filter(NHC %in% nhcs) %>%
group_by(NHC,UQ(rlang::sym(db["dbcode"]))) %>% summarise(Samples=length(UQ(rlang::sym(db["dbsamples"]))), Names=paste0(UQ(rlang::sym(db["dbsamples"])), collapse = ";")) %>% group_by(NHC,UQ(rlang::sym(db["dbcode"]))) %>% summarise(Samples=length(UQ(rlang::sym(db["dbsamples"]))), Names=paste0(UQ(rlang::sym(db["dbsamples"])), collapse = ";")) %>%
merge(data.frame(NHC=nhcs),all=T) %>% mutate(NHC=factor(NHC,levels = nhcs)) %>% arrange(NHC)
merge(data.frame(NHC=nhcs),all=T) %>% mutate(NHC=factor(NHC,levels = unique(nhcs))) %>% arrange(NHC)
}else{ }else{
sqlQuery(conn, query) %>% filter(NHC %in% nhcs) sqlQuery(conn, query) %>% filter(NHC %in% nhcs)
} }

Loading…
Cancel
Save