commit | 5ccc838c83eedb950cd961420b8553c2840cf334 | [log] [tgz] |
---|---|---|
author | Marc Kupietz <kupietz@ids-mannheim.de> | Fri Jan 31 18:59:06 2020 +0100 |
committer | Gerrit Code Review <gerrit2@korap.ids-mannheim.de> | Fri Jan 31 18:59:06 2020 +0100 |
tree | 5770a311b25e07d8ad40f782e1137658019086e1 | |
parent | b7d8c27b86a8acc78b8924a4e675aafa58fe1e7d [diff] | |
parent | 4a89dc4675d596217593e375aae5972f7caf8a73 [diff] |
Merge "frequencyQuery: stop with error if vc is empty"
diff --git a/R/KorAPQuery.R b/R/KorAPQuery.R index cf848f0..5ba459b 100644 --- a/R/KorAPQuery.R +++ b/R/KorAPQuery.R
@@ -346,6 +346,7 @@ corpusQuery(kco, query, vc, metadataOnly = TRUE, as.df = TRUE, ...) %>% mutate(total = corpusStats(kco, vc=vc, as.df=TRUE)$tokens) } ) %>% + { if (.$total == 0) stop(paste0("Virtual corpus \"",vc, "\" is empty. Cannot calculate relative frequencies."), call. = FALSE) } ci(conf.level = conf.level) })