textmeta: "textmeta"-Objects

Description Usage Arguments Value Examples

View source: R/textmeta.R

Description

Creates, Tests, Summarises and Plots Textmeta-Objects

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
textmeta(meta = NULL, text = NULL, metamult = NULL, dateFormat = "%Y-%m-%d")

is.textmeta(x)

## S3 method for class 'textmeta'
print(x, ...)

## S3 method for class 'textmeta'
summary(object, listnames = names(object), metavariables = character(), ...)

## S3 method for class 'textmeta'
plot(x, ...)

Arguments

meta

Data.frame (or matrix) of the meta-data, e.g. as received from as.meta

text

Named list (or character vector) of the text-data (names should correspond to IDs in meta)

metamult

List of the metamult-data

dateFormat

Charachter string with the date format in meta for as.Date

x

an R Object.

...

further arguments in plot. Not implemented for print and summary.

object

textmeta object

listnames

Character vector with names of textmeta lists (meta, text, metamult). Summaries are generated for those lists only. Default gives summaries for all lists.

metavariables

Character vector with variable-names from the meta dataset. Summaries are generated for those variables only.

Value

A textmeta object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
texts <- list(A="Give a Man a Fish, and You Feed Him for a Day.
Teach a Man To Fish, and You Feed Him for a Lifetime",
B="So Long, and Thanks for All the Fish",
C="A very able manipulative mathematician, Fisher enjoys a real mastery
in evaluating complicated multiple integrals.")

corpus <- textmeta(meta=data.frame(id=c("A", "B", "C", "D"),
title=c("Fishing", "Don't panic!", "Sir Ronald", "Berlin"),
date=c("1885-01-02", "1979-03-04", "1951-05-06", "1967-06-02"),
additionalVariable=1:4, stringsAsFactors=FALSE), text=texts)

print(corpus)
summary(corpus)
str(corpus)

tosca documentation built on Oct. 28, 2021, 5:07 p.m.