Learn R Programming

rcqp (version 0.5)

size: Size of a corpus or subcorpus

Description

Size of a corpus (number of tokens) or size of a subcorpus (number of matches).

Usage

size(x)

# S3 method for cqp_corpus size(x)

# S3 method for cqp_subcorpus size(x)

Arguments

x

A cqp_corpus object (created with the function corpus) or a cqp_subcorpus object (created with the function subcorpus)

Value

An integer vector of length 1: the number of tokens if x is a corpus or the number of matches if it is a subcorpus.

References

http://cwb.sourceforge.net/documentation.php

See Also

corpus, subcorpus, summary.cqp_corpus, summary.cqp_subcorpus.

Examples

Run this code
# NOT RUN {
c <- corpus("DICKENS");
size(c);

sc <- subcorpus(c, '"interesting"');
size(sc);
# }

Run the code above in your browser using DataLab