|
@ -40,8 +40,8 @@ sqlShowSamples<-function(conn=dta, nhcs=nhc.test, verb=F, dbtype){ |
|
|
} |
|
|
} |
|
|
if (isFALSE(verb)){ |
|
|
if (isFALSE(verb)){ |
|
|
sqlQuery(conn, query) %>% filter(NHC %in% nhcs) %>% |
|
|
sqlQuery(conn, query) %>% filter(NHC %in% nhcs) %>% |
|
|
group_by(NHC,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) %>% rename((!!db["dbcode"]):='db["dbcode"]') |
|
|
|
|
|
|
|
|
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) |
|
|
}else{ |
|
|
}else{ |
|
|
sqlQuery(conn, query) %>% filter(NHC %in% nhcs) |
|
|
sqlQuery(conn, query) %>% filter(NHC %in% nhcs) |
|
|
} |
|
|
} |
|
|