dna.timeseries: Compute time series statistics

Description Usage Arguments Details Author(s) See Also Examples

View source: R/rDNA.R

Description

Compute actor-wise statement frequency time series statistics.

Usage

1
2
3
4
5
6
7
dna.timeseries(infile, persons = FALSE, time.unit = "month", 
    ignore.duplicates = "article", separate.actors = TRUE, 
    start.date = "first", stop.date = "last", 
    include.persons = "all", include.organizations = "all", 
    include.categories = "all", invert.persons = FALSE, 
    invert.organizations = FALSE, invert.categories = FALSE, 
    agreement = "combined", verbose = TRUE)

Arguments

infile

The input .dna file as a string (i.e., enclosed in quotation marks). If the file is not in the current working directory, specify the path together with the file name. Include the file suffix. Example: sample.dna.

persons

Specify as a boolean value whether persons should be exported. If set to false, organizations are exported.

time.unit

If set to month, statement frequencies are computed per month. If set to year, the number of statements per year is computed. The value total causes DNA to aggregate all frequencies per actor into one column.

ignore.duplicates

A duplicate statement is a statement with the same person, organization, category and agreement pattern as another statement. By default, a duplicate statement is omitted if it is found within the same article (option article). Other options are month (i.e., duplicate statements are omitted if they occur in the same month) and off (i.e., all duplicates are retained).

separate.actors

If this boolean argument is set to true, there will be one actor per row in the resulting matrix. If false, the frequencies of all actors will be aggregated into a single row.

start.date

Only statements after this date will be retained. The start date is a character string of the form dd.mm.yyyy, where dd is the two-digit day, mm the two-digit month and yyyy the four-digit year. Alternatively, the value first will use the first date found in the .dna file.

stop.date

Only statements before this date will be retained. The stop date is a character string of the form dd.mm.yyyy, where dd is the two-digit day, mm the two-digit month and yyyy the four-digit year. Alternatively, the value last will use the last date found in the .dna file.

include.persons

Specify a list of persons to be included in the statistics. For example, c("person 1", "person 2"). Note that the names must appear exactly as they are used on the dataset. Alternatively, the string value all will include all persons in the .dna file.

include.organizations

Specify a list of organizations to be included in the statistics. For example, c("organization 1", "organization 2"). Note that the names must appear exactly as they are used on the dataset. Alternatively, the string value all will include all organizations in the .dna file.

include.categories

Specify a list of categories to be included in the statistics. For example, c("category 1", "category 2"). Note that the concept names must appear exactly as they are used on the dataset. Alternatively, the value all will include all categories in the .dna file.

invert.persons

Reverse the selection of persons. If TRUE, the persons specified in the include.persons argument will be excluded, not included. All other persons will be included.

invert.organizations

Reverse the selection of organizations. If TRUE, the organizations specified in the include.organizations argument will be excluded, not included. All other organizations will be included.

invert.categories

Reverse the selection of categories. If TRUE, the categories specified in the include.categories argument will be excluded, not included. All other categories will be included.

agreement

Can be combined, yes or no. If yes, only positive statements will be counted. If no, only negative statements will be counted. If combined, all kinds of statements are counted.

verbose

If true, details about the data import and its progress will be printed. If false, these information will be suppressed.

Details

An important piece of information in actor-based content analysis is the question how active each actor or actor group is over time. This function generates a matrix of statement frequencies of all actors, aggregated per actor or as a total value and either per year, per month or overall.

Author(s)

Philip Leifeld (http://www.philipleifeld.com)

See Also

rDNA dna.init dna.network dna.categories

Examples

1
2
3
4
5
6
7
download.file("http://www.philipleifeld.de/cms/upload/Downloads/dna-1.31.jar",
    destfile = "dna-1.31.jar", mode = "wb")
download.file("http://www.philipleifeld.de/cms/upload/Downloads/sample.dna", 
    destfile = "sample.dna", mode = "wb")
dna.init("dna-1.31.jar")

time.series <- dna.timeseries("sample.dna")

rDNA documentation built on May 30, 2017, 12:15 a.m.