Get hits for a (set of) queries, optionally with s-attribute values.
hits(.Object, ...)# S4 method for character
hits(.Object, query, cqp = FALSE, s_attribute = NULL,
p_attribute = "word", size = FALSE, freq = FALSE, mc = FALSE,
verbose = TRUE, progress = TRUE, ...)
# S4 method for partition
hits(.Object, query, cqp = FALSE, s_attribute = NULL,
p_attribute = "word", size = FALSE, freq = FALSE, mc = FALSE,
progress = FALSE, verbose = TRUE, ...)
# S4 method for partition_bundle
hits(.Object, query, cqp = FALSE,
p_attribute = getOption("polmineR.p_attribute"), size = TRUE,
freq = FALSE, mc = getOption("polmineR.mc"), progress = FALSE,
verbose = TRUE, ...)
# S4 method for hits
sample(x, size)
# S4 method for context
hits(.Object, s_attribute = NULL, verbose = TRUE, ...)
a character, partition
or partition_bundle
object
further parameters
a (optionally named, see datails) character vector with one or more queries
either logical (TRUE if query is a CQP query), or a function to check whether query is a CQP query or not
s-attributes
p-attribute
logical - return size of subcorpus
logcial - return relative frequencies
logical, whether to use multicore
logical
logical, whether to show progress bar
a hits object
stat
a "data.table"
corpus
a "character"
vector
query
Object of class "character"
p_attribute
p-attribute that has been queried
encoding
encoding of the corpus
name
name of the object
If the query character vector is named, the names of the query occurr in the data.table that is returned rather than the queries.
If freq is TRUE, the data.table returned in the DT-slot will deliberately include the subsets of the partition/corpus with no hits (query is NA, count is 0).