Use \dontrun instead of \donttest for non-essential examples
This is not so nice for the user experience because of the
wrappers arround examples:
## Not run
...
## End(Not run)
but it is necessary to some extent to pass automatic CRAN
checks under all circumstances, which actually do run
the donttest examples since R 4.0 with a time limit of apparently
20min in total.
Change-Id: If09b1aa381e26179ec1a36edd9d8b07116e3c33e
diff --git a/R/KorAPQuery.R b/R/KorAPQuery.R
index e6f240e..9bab575 100644
--- a/R/KorAPQuery.R
+++ b/R/KorAPQuery.R
@@ -99,20 +99,25 @@
#' Please make sure to check `$collection$rewrites` to see if any unforeseen access rewrites of the query's virtual corpus had to be performed.
#'
#' @examples
+#' \dontrun{
+#'
#' # Fetch metadata of every query hit for "Ameisenplage" and show a summary
-#' \donttest{
#' new("KorAPConnection") %>% corpusQuery("Ameisenplage") %>% fetchAll()
#' }
#'
+#' \dontrun{
+#'
#' # Use the copy of a KorAP-web-frontend URL for an API query of "Ameise" in a virtual corpus
#' # and show the number of query hits (but don't fetch them).
#'
#' new("KorAPConnection", verbose = TRUE) %>%
#' corpusQuery(KorAPUrl =
#' "https://korap.ids-mannheim.de/?q=Ameise&cq=pubDate+since+2017&ql=poliqarp")
+#' }
+#'
+#' \dontrun{
#'
#' # Plot the time/frequency curve of "Ameisenplage"
-#' \donttest{
#' new("KorAPConnection", verbose=TRUE) %>%
#' { . ->> kco } %>%
#' corpusQuery("Ameisenplage") %>%
@@ -224,7 +229,9 @@
#' @return The `kqo` input object with updated slots `collectedMatches`, `apiResponse`, `nextStartIndex`, `hasMoreMatches`
#'
#' @examples
-#' \donttest{q <- new("KorAPConnection") %>% corpusQuery("Ameisenplage") %>% fetchNext()
+#' \dontrun{
+#'
+#' q <- new("KorAPConnection") %>% corpusQuery("Ameisenplage") %>% fetchNext()
#' q@collectedMatches
#' }
#'
@@ -321,7 +328,8 @@
#' **`fetchAll`** fetches all results of a KorAP query.
#'
#' @examples
-#' \donttest{
+#' \dontrun{
+#'
#' q <- new("KorAPConnection") %>% corpusQuery("Ameisenplage") %>% fetchAll()
#' q@collectedMatches
#' }
@@ -336,7 +344,8 @@
#' Fetches the remaining results of a KorAP query.
#'
#' @examples
-#' \donttest{
+#' \dontrun{
+#'
#' q <- new("KorAPConnection") %>% corpusQuery("Ameisenplage") %>% fetchRest()
#' q@collectedMatches
#' }
@@ -358,7 +367,8 @@
#' @aliases frequencyQuery
#' @rdname KorAPQuery-class
#' @examples
-#' \donttest{
+#' \dontrun{
+#'
#' new("KorAPConnection", verbose = TRUE) %>%
#' frequencyQuery(c("Mücke", "Schnake"), paste0("pubDate in ", 2000:2003))
#' }