Sets or initializes system metadata for new objects.
meta_system(x, field = NULL)
meta_system(x, field = NULL) <- value
# S3 method for corpus
meta_system(x, field = NULL) <- value
# S3 method for tokens
meta_system(x, field = NULL) <- value
# S3 method for dfm
meta_system(x, field = NULL) <- value
# S3 method for dictionary
meta_system(x, field = NULL) <- value
meta_system_defaults()
an object for which the metadata will be read or set
metadata field name(s); if NULL
(default), return all
metadata names
new value of the metadata field
character; the input object class
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.
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)
#> $`package-version`
#> [1] ‘3.2.4’
#>
#> $`r-version`
#> [1] ‘4.2.2’
#>
#> $system
#> sysname machine user
#> "Linux" "x86_64" "kohei"
#>
#> $directory
#> [1] "/home/kohei/repo/quanteda/docs/reference"
#>
#> $created
#> [1] "2022-12-15"
#>