Learn R Programming

events (version 0.5)

read_keds: Read KEDS events files

Description

Reads KEDS event data output files

Usage

read_keds(d, keep.quote = FALSE, keep.label = TRUE, one.a.day = TRUE, scrub.keds = TRUE, date.format = "%y%m%d")

Arguments

d
Names of files of KEDS/TABARI output
keep.quote
Whether the exact noun phrase be retained
keep.label
Whether the label for the event code should be retained
one.a.day
Whether to apply the duplicate event remover
scrub.keds
Whether to apply the data cleaner
date.format
How dates are represented in the first column

Value

An event data set

Details

Reads KEDS output and optionally applies the scrub_keds cleaning function and the one_a_day duplicate removal filter. This function is thin wrapper around read.csv.

This function assumes that d are a vector of KEDS/TABARI output files. These are assumed to be tab separated text files wherein the first field is a date in yymmdd format or as specified by date.format, the second and third fields are actor codes, the fourth field is an event code, and the fifth field is a text label for the event type, and the sixth field is a quote - some kind of text from which the event code was inferred. Label and quote are optional and can be discarded when reading in.