Optimize imports

Change-Id: I618171ab2a81279f61da719ced0317c719c40e49
diff --git a/NAMESPACE b/NAMESPACE
index 091ce17..4c3ff8f 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -27,25 +27,28 @@
 exportMethods(initialize)
 exportMethods(show)
 import(R.cache)
-import(dplyr)
 import(httr)
-import(jsonlite)
 import(methods)
-import(purrr)
-import(tidyr)
 import(utils)
 importFrom(broom,tidy)
 importFrom(dplyr,bind_cols)
+importFrom(dplyr,bind_rows)
+importFrom(dplyr,enquo)
 importFrom(dplyr,group_by)
 importFrom(dplyr,mutate)
+importFrom(dplyr,rename)
+importFrom(dplyr,rowwise)
 importFrom(dplyr,select)
+importFrom(dplyr,starts_with)
 importFrom(dplyr,summarise)
 importFrom(jsonlite,fromJSON)
 importFrom(lubridate,year)
 importFrom(magrittr,"%>%")
+importFrom(purrr,map_dfr)
 importFrom(stats,prop.test)
 importFrom(tibble,as_tibble)
 importFrom(tibble,remove_rownames)
 importFrom(tibble,rownames_to_column)
+importFrom(tibble,tibble)
 importFrom(tidyr,complete)
 importFrom(tidyr,expand_grid)
diff --git a/R/KorAPConnection.R b/R/KorAPConnection.R
index 85d8997..013e5b8 100644
--- a/R/KorAPConnection.R
+++ b/R/KorAPConnection.R
@@ -6,10 +6,6 @@
 #' @import R.cache
 #' @import utils
 #' @import methods
-#' @import dplyr
-#' @import purrr
-#' @import tidyr
-
 #' @export
 KorAPConnection <- setClass("KorAPConnection", slots=c(KorAPUrl="character", apiVersion="character", apiUrl="character", userAgent="character", timeout="numeric", verbose="logical", cache="logical"))
 
diff --git a/R/KorAPQuery.R b/R/KorAPQuery.R
index 868089c..b4fbe6a 100644
--- a/R/KorAPQuery.R
+++ b/R/KorAPQuery.R
@@ -4,9 +4,6 @@
 #' New \code{KorAPQuery} objects are typically created by the \code{\link{corpusQuery}} method.
 #'
 #' @include KorAPConnection.R
-#' @import jsonlite
-#' @import tidyr
-#' @import dplyr
 #' @import httr
 #'
 #' @include RKorAPClient.R
@@ -41,6 +38,8 @@
 #' @param apiResponse data-frame representation of the JSON response of the API request
 #' @param hasMoreMatches logical that signals if more query results can be fetched
 #' @param collectedMatches matches already fetched from the KorAP-API-server
+#'
+#' @importFrom tibble tibble
 #' @export
 setMethod("initialize", "KorAPQuery",
           function(.Object, korapConnection = NULL, request = NULL, vc="", totalResults=0, nextStartIndex=0, fields=c("corpusSigle", "textSigle", "pubDate",  "pubPlace",
@@ -202,6 +201,8 @@
 #'
 #' @aliases fetchNext
 #' @rdname KorAPQuery-class
+#' @importFrom purrr map_dfr
+#' @importFrom dplyr rowwise bind_rows
 #' @export
 setMethod("fetchNext", "KorAPQuery", function(kqo, offset = kqo@nextStartIndex, maxFetch = maxResultsPerPage, verbose = kqo@korapConnection@verbose) {
   if (kqo@totalResults == 0 || offset >= kqo@totalResults) {
diff --git a/R/ci.R b/R/ci.R
index 797252c..fff68f0 100644
--- a/R/ci.R
+++ b/R/ci.R
@@ -1,4 +1,3 @@
-
 #' Add confidence interval and relative frequency variables
 #'
 #' Using \code{\link{prop.test}}, \code{ci} adds three columns to a data frame:
@@ -6,6 +5,7 @@
 #' 2. lower bound of a confidence interval (\code{ci.low})
 #' 3. upper bound of a confidence interval
 #'
+#'
 #' @seealso
 #' \code{ci} is alread included in \code{\link{frequencyQuery}}
 #'
@@ -18,6 +18,7 @@
 #' @export
 #' @importFrom stats prop.test
 #' @importFrom tibble remove_rownames
+#' @importFrom dplyr enquo rename starts_with
 #' @examples
 #' library(ggplot2)
 #' kco <- new("KorAPConnection", verbose=TRUE)