Learn R Programming

rcqp (version 0.5)

sort.cqp_kwic: Sort a kwic list

Description

Sort a kwic list with respect to an anchor and a positional attribute.

Usage

# S3 method for cqp_kwic
sort(x, decreasing = FALSE, sort.anchor = "match", 
        sort.attribute = "word", sort.offset = 0, ...)

Arguments

x

A cqp_kwic object.

decreasing

Reverse order.

sort.anchor

The anchor (match, matchend, target, keyword) to be used as sorting key.

sort.attribute

The attribute (such as word, lemma… according to the available attributes in a given corpus) for sorting the lines of the concordance.

sort.offset

Sort on the selected anchor, or n tokens before or after it.

Ignored.

References

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

See Also

cqp_kwic, print.cqp_kwic.

Examples

Run this code
# NOT RUN {
c <- corpus("DICKENS");
sc <- subcorpus("DICKENS", "interesting");
kwic <- cqp_kwic <- (sc);
kwic <- sort(kwic)
print(kwic);
# }

Run the code above in your browser using DataLab