♻️💄 simplify KorAPConnection class instantiations to modern syntax
Update all class instantiations from `new("KorAPConnection")` to `KorAPConnection()`.
This is possible with R >= 4.0.
Change-Id: I01131fb32045e084cafbb9e05cd8ba99f8f20f1b
diff --git a/R/misc.R b/R/misc.R
index 9abbe07..ac70f47 100644
--- a/R/misc.R
+++ b/R/misc.R
@@ -23,7 +23,7 @@
#' @examples
#' \dontrun{
#'
-#' new("KorAPConnection") %>% frequencyQuery("Test", paste0("pubDate in ", 2000:2002)) %>% ipm()
+#' KorAPConnection() %>% frequencyQuery("Test", paste0("pubDate in ", 2000:2002)) %>% ipm()
#' }
ipm <- function(df) {
df %>%
@@ -46,7 +46,7 @@
#' @examples
#' \dontrun{
#'
-#' new("KorAPConnection") %>%
+#' KorAPConnection() %>%
#' frequencyQuery(c("Tollpatsch", "Tolpatsch"),
#' vc=paste0("pubDate in ", 2000:2002),
#' as.alternatives = TRUE) %>%
@@ -113,7 +113,7 @@
#' @examples
#' \dontrun{
#' library(ggplot2)
-#' kco <- new("KorAPConnection", verbose=TRUE)
+#' kco <- KorAPConnection(verbose=TRUE)
#'
#' expand_grid(condition = c("textDomain = /Wirtschaft.*/", "textDomain != /Wirtschaft.*/"),
#' year = (2005:2011)) %>%