Learn R Programming

polmineR (version 0.6.1)

read: Return to the original text and read

Description

Generate text (i.e. html) and read it in the viewer pane of RStudio. If called on a "partitionBundle"-object, skip through the partitions contained in the bundle.

Usage

read(.Object, ...)
"read"(.Object, meta = getOption("polmineR.meta"), highlight = list(), cqp = FALSE, tooltips = NULL, verbose = TRUE, cpos = FALSE, ...)
"read"(.Object, highlight = list(), cqp = FALSE, cpos = FALSE, ...)
"read"(.Object, col, partitionBundle, cqp = FALSE, highlight = list(), cpos = FALSE, ...)
"read"(.Object, def, i = NULL, ...)
"read"(.Object, i, type = NULL)

Arguments

.Object
an object to be read ("partition" or "partitionBundle")
...
further parameters passed into read
meta
a character vector supplying s-attributes for the metainformation to be printed, if not stated explicitly, session settings will be used
highlight
a list
cqp
a list of character vectors with regular expressions to highlight relevant terms or expressions; the names of the list provide the colors
tooltips
a list
verbose
logical
cpos
logical
col
column
partitionBundle
a partitionBundle object
def
...
i
...
type
...

See Also

For concordances / a keword-in-context display, see kwic.

Examples

Run this code
if (require(polmineR.sampleCorpus) && require(rcqp)){
   use("polmineR.sampleCorpus")
   options("polmineR.meta" = "text_date")
   merkel <- partition(
     "PLPRBTTXT",
     text_date="2009-11-10", text_name="Angela Dorothea Merkel",
     type="plpr"
   )
   read(merkel, meta=c("text_name", "text_date"))
   read(
     merkel,
     highlight=list(yellow=c("Deutschland", "Bundesrepublik"), lightgreen="Regierung")
     )
   all <- partition("PLPRBTTXT", list(text_id=".*"), regex=TRUE, type="plpr")
   ## Not run: 
#    speeches <- as.speeches(all, sAttributeDates="text_date", sAttributeNames="text_name", gap=500)
#    read(speeches)
#    migVocab <- count(speeches, query=c("Migration", "Integration", "Zuwanderung"))
#    read(migVocab, col="Integration", partitionBundle=speeches)
#    ## End(Not run)
}

Run the code above in your browser using DataLab