votedf: Return a data frame of vote types based on text file

Description Usage Arguments Details Value See Also Examples

View source: R/voteDf.R

Description

A function to transform text into units of voteinfo

Usage

1
votedf(pattern, txtvector, strlength = 200)

Arguments

pattern

Regex pattern to split the text file on

txtvector

Vector of text to make into a data frame. Should be stored by the mend.text function.

strlength

Integer indicating how much of the string after each vote should be kept. With rollcalls it is seldom enough with under 1000

Details

If a C stack usage error occurs, this is often a consequence of infinite loops caused by wrongly specified pattern argument. Check whether the pattern argument is correctly specified.

Value

Returns a dataframe with vote info on the specified text file

See Also

percincrease

Examples

1
2
3
4
order.files("~Storting/storting1899")
collapse.text("~Storting/storting1899")
s1899text <- mend.text("~Storting/storting1899/")
s1899df <- voteDf("Votering[[:punct:]]", s1899text, 500)

martigso/stortingAlpha documentation built on May 21, 2019, 12:37 p.m.