Skip to content

indexing_core_objects

kbenoit edited this page May 30, 2019 · 1 revision

Indexing core objects

In the table below, the first row for each object class is the < 2.0 version, and the second row is the proposed 2.0 change.

object $ [ [[ [ , ]
character -- index by integer, logical, or element name -- --
-- (same) -- --
corpus access corpus list element texts(x)[ docvars(x)[ --
return single docvar index corpus by integer, logical, or docname new texts(x)[ --
tokens $.list [.list (tokens) [[.list (character) --
return single docvar (same) (same)
dfm -- index dfm (rows) by integer, logical, or docname -- [.matrix(x, i, j, drop = FALSE)
return single docvar (same) -- (same)
fcm -- same as dfm -- [.matrix(x, i, j, drop = FALSE)
-- disable? (same)
dictionary $.list [.list (dictionary) -[[.list (character) --
(same) (same) (same)