♻️💄 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/man/misc-functions.Rd b/man/misc-functions.Rd
index d9433a3..4c21101 100644
--- a/man/misc-functions.Rd
+++ b/man/misc-functions.Rd
@@ -74,7 +74,7 @@
\dontrun{
library(ggplot2)
-kco <- new("KorAPConnection", verbose=TRUE)
+kco <- KorAPConnection(verbose=TRUE)
expand_grid(year=2015:2018, alternatives=c("Hate Speech", "Hatespeech")) \%>\%
bind_cols(corpusQuery(kco, .$alternatives, sprintf("pubDate in \%d", .$year))) \%>\%
mutate(total=corpusStats(kco, vc=vc)$tokens) \%>\%
@@ -84,11 +84,11 @@
}
\dontrun{
-new("KorAPConnection") \%>\% frequencyQuery("Test", paste0("pubDate in ", 2000:2002)) \%>\% ipm()
+KorAPConnection() \%>\% frequencyQuery("Test", paste0("pubDate in ", 2000:2002)) \%>\% ipm()
}
\dontrun{
-new("KorAPConnection") \%>\%
+KorAPConnection() \%>\%
frequencyQuery(c("Tollpatsch", "Tolpatsch"),
vc=paste0("pubDate in ", 2000:2002),
as.alternatives = TRUE) \%>\%
@@ -100,7 +100,7 @@
\dontrun{
library(ggplot2)
-kco <- new("KorAPConnection", verbose=TRUE)
+kco <- KorAPConnection(verbose=TRUE)
expand_grid(condition = c("textDomain = /Wirtschaft.*/", "textDomain != /Wirtschaft.*/"),
year = (2005:2011)) \%>\%