Learn R Programming

polmineR (version 0.7.0)

read: Display and read full text

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 = NULL, highlight = list(), cqp = FALSE, tooltips = NULL, verbose = TRUE, cpos = FALSE, cutoff = getOption("polmineR.cutoff"), ...)
"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)
"read"(.Object, meta = 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
cutoff
maximum number of tokens to display
col
column
partitionBundle
a partitionBundle object
def
...
i
...
type
...

See Also

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

Examples

Run this code
## Not run: 
# 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"),
#    meta = c("text_name", "text_date")
# )
# all <- partition("PLPRBTTXT", list(text_id=".*"), regex=TRUE, type="plpr")
#    
# 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