Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

fcm-class

Virtual class "fcm" for a feature co-occurrence matrix


Description

The fcm class of object is a special type of fcm object with additional slots, described below.

Usage

## S4 method for signature 'fcm'
t(x)

## S4 method for signature 'fcm,numeric'
Arith(e1, e2)

## S4 method for signature 'numeric,fcm'
Arith(e1, e2)

## S4 method for signature 'fcm,index,index,missing'
x[i, j, ..., drop = TRUE]

## S4 method for signature 'fcm,index,index,logical'
x[i, j, ..., drop = TRUE]

## S4 method for signature 'fcm,missing,missing,missing'
x[i, j, ..., drop = TRUE]

## S4 method for signature 'fcm,missing,missing,logical'
x[i, j, ..., drop = TRUE]

## S4 method for signature 'fcm,index,missing,missing'
x[i, j, ..., drop = TRUE]

## S4 method for signature 'fcm,index,missing,logical'
x[i, j, ..., drop = TRUE]

## S4 method for signature 'fcm,missing,index,missing'
x[i, j, ..., drop = TRUE]

## S4 method for signature 'fcm,missing,index,logical'
x[i, j, ..., drop = TRUE]

Arguments

x

the fcm object

e1

first quantity in "+" operation for fcm

e2

second quantity in "+" operation for fcm

i

index for features

j

index for features

...

additional arguments not used here

drop

always set to FALSE

Slots

context

the context definition

window

the size of the window, if context = "window"

count

how co-occurrences are counted

weights

context weighting for distance from target feature, equal in length to window

margin

frequencies of features in the original dfm or tokens

tri

whether the lower triangle of the symmetric V \times V matrix is recorded

ordered

whether a term appears before or after the target feature are counted separately

See Also

Examples

# fcm subsetting
fcmat <- fcm(tokens(c("this contains lots of stopwords",
                  "no if, and, or but about it: lots"),
                remove_punct = TRUE))
fcmat[1:3, ]
fcmat[4:5, 1:5]

quanteda

Quantitative Analysis of Textual Data

v3.0.0
GPL-3
Authors
Kenneth Benoit [cre, aut, cph] (<https://orcid.org/0000-0002-0797-564X>), Kohei Watanabe [aut] (<https://orcid.org/0000-0001-6519-5265>), Haiyan Wang [aut] (<https://orcid.org/0000-0003-4992-4311>), Paul Nulty [aut] (<https://orcid.org/0000-0002-7214-4666>), Adam Obeng [aut] (<https://orcid.org/0000-0002-2906-4775>), Stefan Müller [aut] (<https://orcid.org/0000-0002-6315-4125>), Akitaka Matsuo [aut] (<https://orcid.org/0000-0002-3323-6330>), William Lowe [aut] (<https://orcid.org/0000-0002-1549-6163>), Christian Müller [ctb], European Research Council [fnd] (ERC-2011-StG 283794-QUANTESS)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.