Learn R Programming

quanteda (version 3.3.1)

readtext-methods: Extensions for readtext objects

Description

These functions provide quanteda methods for readtext objects.

Usage

# S3 method for readtext
docnames(x)

# S3 method for readtext docvars(x, field = NULL)

# S3 method for readtext ndoc(x)

Value

docnames(x) returns a character vector of the document names from a readtext object

docvars(x, field = NULL) returns a data.frame of the document variables from a readtext object or a vector if field is a single value

ndoc(x) returns the number of documents from a readtext object

Arguments

x

an object read by readtext() from the readtext package

field

string containing the document-level variable name