Method for textstat
objects and classes inheriting from
textstat
; if object
is a character vector, the encoding of the
corpus is returned..
encoding(object) encoding(object) <- value # S4 method for textstat encoding(object) # S4 method for bundle encoding(object) # S4 method for character encoding(object) # S4 method for corpus encoding(object) # S4 method for subcorpus encoding(object)
object | A |
---|---|
value | Value to be assigned. |
# Get encoding of a corpus. encoding("REUTERS")#> [1] "latin1"#>#>encoding(r)#> [1] "latin1"# Get encoding of another class inheriting from textstat (count). cnt <- count("REUTERS", p_attribute = "word") encoding(cnt)#> [1] "latin1"# Get encoding of objects in a bundle. pb <- partition_bundle("REUTERS", s_attribute = "id") encoding(pb)#> [1] "latin1"