## Overview

Some (usually older) data sets are only available in fixed-width ASCII files (.txt or .dat) that have an .sps (SPSS) or .sas (SAS) setup file explaining to the software how to read that file. These file combinations are sometimes referred to as .txt+.sps, .txt+.sas, .dat+.sps, .dat+.sas. This package allows you to read in the data if you have both the fixed-width file and its accompanying setup file.

## Installation

To install this package, use the code

# The development version is available on Github.
# install.packages("devtools")
devtools::install_github("jacobkap/asciiSetupReader")

## Usage

These parameters data and setup_file are the only ones requires to run the package though three optional parameters allow you to customize results.

data - A string containing the name of the data file setup_file - A string containing the name of the data file

Both files must be in your working directory or the string must contain the path to the file. Below is an example of reading in the example dataset - the original data and setup files can be found here.

data <- system.file("extdata", "example_data.zip",
example[1:6, 1:4] # Look at first 6 rows and first 4 columns
##   IDENTIFIER_CODE NUMERIC_STATE_CODE ORI_CODE             GROUP
## 6 SHR master file            Arizona  AZ00189       Cit < 2,500