Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
R
 
 
 
 
 
 
man
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

readroper

Build Status

Use this package to read ASCII fixed-width data files from the Roper Center and other polling providers into R.

Installation

You can install the released version of readroper from CRAN with:

install.packages("readroper")

The development version from GitHub is installed with:

# install.packages("devtools")
devtools::install_github("petulla/readroper")

Usage

To read weights and three questions from card 1 from a multicard ASCII polling file and output a csv file, you'll want something like:

  weights <- read_rpr(col_positions=c(1),
               widths=c(3),
               col_names=c('Weights'),
               filepath='data.txt')
   card1 <- read_rpr(col_positions=c(1,2,4), 
               widths=c(1,2,1), 
               col_names=c('Q1','Q2','Q3'), 
               filepath='data.txt', 
               card_read=1, 
               cards=2)
   GALLUP <- cbind(weights,card1)
   write.csv(GALLUP,file='cnngallup.csv', row.names=FALSE)

For instructions on use see the vignette.

About

Read single and multi-card ASCII polling datasets in R

Topics

Resources

License

Packages

No packages published

Languages

You can’t perform that action at this time.