|
@ -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) |
|
|
} |
|
|
} |
|
|