readtext-methods: Extensions for readtext objects

readtext-methodsR Documentation

Extensions for readtext objects

Description

These functions provide quanteda methods for readtext objects.

Usage

## S3 method for class 'readtext'
docnames(x)

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

## S3 method for class 'readtext'
ndoc(x)

Arguments

x

an object read by readtext() from the readtext package

field

string containing the document-level variable name

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


quanteda documentation built on May 31, 2023, 8:28 p.m.