Learn R Programming

RKorAPClient (version 1.1.0)

fetchAll,KorAPQuery-method: Fetch all results of a KorAP query.

Description

fetchAll fetches all results of a KorAP query.

Usage

# S4 method for KorAPQuery
fetchAll(kqo, verbose = kqo@korapConnection@verbose, ...)

Value

The updated kqo object with all results in @collectedMatches

Arguments

kqo

object obtained from corpusQuery()

verbose

print progress information if true

...

further arguments passed to fetchNext()

See Also

Other corpus search functions: corpusQuery,KorAPConnection-method, fetchNext,KorAPQuery-method

Examples

Run this code
if (FALSE) {
# Fetch all metadata of every query hit for "Ameisenplage" and show a summary
q <- KorAPConnection() |>
  corpusQuery("Ameisenplage") |>
  fetchAll()
q@collectedMatches

# Fetch also all KWICs
q <- KorAPConnection() |> auth() |>
 corpusQuery("Ameisenplage", metadataOnly = FALSE) |>
 fetchAll()
q@collectedMatches

# Retrieve title and text sigle metadata of all texts published on 1958-03-12
q <- KorAPConnection() |>
 corpusQuery("", # this matches each text once
    vc = "pubDate in 1958-03-12",
    fields = c("textSigle", "title"),
) |>
 fetchAll()
q@collectedMatches
}

Run the code above in your browser using DataLab