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

meta_system

Internal function to get, set or initialize system metadata


Description

Sets or initializes system metadata for new objects.

Usage

meta_system(x, field = NULL)

meta_system(x, field = NULL) <- value

## S3 replacement method for class 'corpus'
meta_system(x, field = NULL) <- value

## S3 replacement method for class 'tokens'
meta_system(x, field = NULL) <- value

## S3 replacement method for class 'dfm'
meta_system(x, field = NULL) <- value

## S3 replacement method for class 'dictionary'
meta_system(x, field = NULL) <- value

meta_system_defaults()

Arguments

x

an object for which the metadata will be read or set

field

metadata field name(s); if NULL (default), return all metadata names

value

new value of the metadata field

source

character; the input object class

Value

meta_system returns a list with the object's system metadata. It is literally a wrapper to meta(x, field, type = "system")().

meta_system<- returns the object with the system metadata modified. This is an internal function and not designed for users!

meta_system_defaults returns a list of default system values, with the user setting the "source" value. This should be used to set initial system meta information.

Examples

corp <- corpus(c(d1 = "one two three", d2 = "two three four"))
# quanteda:::`meta_system<-`(corp, value = quanteda:::meta_system_defaults("example"))
quanteda:::meta_system(corp)

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.