powered by
A coerce-method is available to coerce a partition object to a regions object.
partition
regions
as.regions(x)# S4 method for regions as.data.table(x, values = NULL)
# S4 method for regions as.data.table(x, values = NULL)
object of class regions
values to assign to a column that will be added
cpos
a two-column data.table that will include a "cpos_left" and "cpos_right" column
data.table
corpus
the CWB corpus (character vector length 1)
encoding
the encoding of the CWB corpus (character vector length 1)
# NOT RUN { use("polmineR.sampleCorpus") P <- partition("PLPRBTTXT", text_date = "2009-11-12", text_name = "Jens Spahn") R <- as.regions(P) encode(R, sAttribute = "text_foo", values = "Jens") # }
Run the code above in your browser using DataLab