hits_class: S4 class to represent hits for queries.

hits_classR Documentation

S4 class to represent hits for queries.

Description

S4 class to represent hits for queries.

Usage

## S4 method for signature 'hits'
sample(x, size)

Arguments

x

A hits object.

size

A non-negative integer giving the number of items to choose.

Slots

stat

A data.table with the following columns:

query

The query (optionally using CQP syntax) that evoked a hit.

count

Number of matches in corpus/subcorpus.

freq

Relative frequency of matches in corpus/subcorpus (optional, presence depends on usage of argument freq of the hits method).

size

Total number of tokens in corpus/subcorpus (optional, presence depends on usage of argument size of the hits method).

If argument s_attribute has been used in the call of the hits method, the data.table will include additional columns with the s-attributes. The values in the columns will be the values these s-attributes assume. Columns count, freq and size will be based on subcorpora defined by (combinations of) s-attributes.

corpus

A length-one "character" vector, ID of the corpus with hits for query or queries.

query

Object of class "character", query or queries for

p_attribute

The p-attribute that has been queried, a length-one character vector.

encoding

Length-one character vector, the encoding of the corpus.

name

Length-one characte vector, name of the object.


polmineR documentation built on Nov. 2, 2023, 5:52 p.m.