|
|
@ -54,7 +54,7 @@ sqlShowSamples<-function(conn=dta, nhcs=nhc.test, verb=F, dbtype=NULL){ |
|
|
|
if (isFALSE(verb)){ |
|
|
|
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 = ";")) %>% |
|
|
|
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{ |
|
|
|
sqlQuery(conn, query) %>% filter(NHC %in% nhcs) |
|
|
|
} |
|
|
|