Skip to content

asciiSetupReader

2.6.0Package record

Reads Fixed-Width ASCII Data Files (.txt or .dat) that Have Accompanying Setup Files (.sps or .sas)

1packages depend
6.1Kdownloads / year
91.9%test coverage
13/13flavors OK

Overview

About

Lets you open a fixed-width ASCII file (.txt or .dat) that has an accompanying setup file (.sps or .sas). These file combinations are sometimes referred to as .txt+.sps, .txt+.sas, .dat+.sps, or .dat+.sas. This will only run in a txt-sps or txt-sas pair in which the setup file contains instructions to open that text file. It will NOT open other text files, .sav, .sas, or .por data files. Fixed-width ASCII files with setup files are common in older (pre-2000) government data.

Changes in 2.6.0

Bug fixes

  • coerce_numeric = TRUE now checks every row before converting a column to numeric. Previously files over 50,000 rows only had a random sample of rows checked (and a file of exactly 50,000 rows only 5,000), so a column with rare text values could be converted to numeric, silently turning those values into NA, differently on every run. The sampling also changed the user's random number stream.
  • Values with bytes that are invalid in the current locale no longer cause an error when checking for numeric columns (the column stays character) or when applying open-ended missing value ranges.
  • make_sps_setup() works again on R >= 4.5.0 (it failed with "NA in coercion to boolean"), works when col_labels isn't given, and no longer leaves a sink() open if it fails. A file_name ending in ".SPS" no longer gets a second extension, and one merely ending in "sps" (e.g. "datasps") is no longer cut short.
Show all changes in 2.6.0Hide the rest of the changes in 2.6.0
  • Missing values given as "X thru highest" no longer fail with "labels must be unique" when the value X itself appears in the data.
  • Open-ended missing value ranges now match zero-padded data (e.g. "0000012" for "0000009 THRU HI"). Previously those values were left in the data.
  • Missing value ranges written "LO THRU X" or "LOWEST THRU X" are now applied. Previously only "low thru" was recognized, so these were ignored.
  • make_sps_setup()'s missing_values accepts column names as well as labels. Previously a column name was treated as a missing value of the column before it.
  • SPSS setup files whose first line is DATA LIST can now be read.

Speed

  • Parsing setup files is much faster, especially for files with many columns (e.g. PSID setup files: from about 2 minutes to under 10 seconds).
  • Reading data is faster: the data is no longer copied twice, and value labels and missing values are applied with a direct lookup.

Other changes

  • spss_ascii_reader() and sas_ascii_reader() now call read_ascii_setup(); results and arguments are unchanged.
  • Data files are read with vroom only. If vroom failed, the package used to retry silently with readr, which since readr 2.0 reads with vroom too, so the retry rarely helped and hid vroom's error. Now vroom's error is shown.
  • The package no longer depends on haven or zoo.
  • Requires R >= 3.6.0 (as vroom already did).
  • Examples now run, and the code is commented.
  • Adds a GitHub Actions R CMD check workflow, replacing Travis and AppVeyor.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 8.1 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-08
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 2.6.0
READMEYes · 259 wordsVignettesYes · 3 · dynamicNEWSYes · 100% structured · mentions 2.6.0Citation fileNo
Help pages
6
Examples that run
100%6 run in a plain check (1 of them under a condition)
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
0%

Downloads

6.1K
CRAN downloads in the past year
Rank #5,145 · ~17/day · ~508/mo
Daily download trend is not available in this view yet.
58030 days
1.6K90 days
6.1K1 year
Compare downloads with other packages →
Also on228 r2u39 autocran

Repository

14Stars
5Forks
0Open issues
0Open PRs
1Releases
268Commits
2Commit identities
asciifixed-widthdata-readerrsasdatspssfixed-width-text
268 commits · Last activity 2026-10-17 · 0% stars, 30d · Default branch at 2.6.0.9000, ahead of CRAN 2.6.0 (checked 2026-10-18)
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
14
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-03-29 · 122026-09-01 · 14
PracticesBeta

12 development-tooling and community-health practices detected across 6 families in the upstream repository

Checks run against github.com/jacobkap/asciisetupreader on 2026-10-18.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (3)
Code of conductContributing guideIssue templates
Docs source (3)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-10-17

Coverage (1)
Coverage reporting (Codecov)
Show all practicesHide 2 practices
CRAN release process (2)
cran-comments.mdrevdep/
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2026-10-15
    Named in .gitignore: .claude
    Pull request it wrote: opened by a project member
    Commits: at least 19 crediting it in the message
Models named in its commits
  • Claude Opus 5.519 commits · Oct 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
11 external dependencies (excludes base and recommended)

Installing asciiSetupReader adds 52 packages (30 with compiled code, 47 MB of source tarballs). Heaviest: stringi 11 MB, data.table 5.7 MB, bslib 5.6 MB.

Depends (1)
R >= 3.6.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
1direct
0indirect
Imports 1
Depends, Imports or LinkingTo, most downloaded first

People & History

People (1)
Author, Maintainer since 1.0 (2017)
Releases (16)

Pick two releases to compare their code metrics.

  • 2.6.0Latest
    record
    2026-10-17 · current release · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • 2.5.3
    record
    2025-09-23 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • 2.5.2
    record
    2024-08-17 · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • 2.5.1
    record
    2023-07-05 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • 2.4.0
    record
    2021-02-03 · diff ↗
  • 2.3.2
    record
    2020-11-28 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • 2.3.1
    record
    2020-03-21 · diff ↗
  • 2.3.0
    record
    2020-01-19 · diff ↗
  • 2.2.0
    record
    2019-10-08 · diff ↗ ·
    added 1 export
    read_ascii_setup_addin
Show 10 earlier eventsHide 10 earlier events

Package metadata

First published
2017-09-07
Total releases
16 / 9 yrs
License
MIT + file LICENSE OSI · relicensed from GPL in 2.0.0
Minimum R
≥ 3.6.0
Download size
3.5 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("asciiSetupReader")
Kaplan, J. (2026). asciiSetupReader: Reads Fixed-Width ASCII Data Files (.txt or .dat) that Have Accompanying Setup Files (.sps or .sas) (Version 2.6.0) [Computer software]. https://doi.org/10.32614/CRAN.package.asciiSetupReader

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for asciiSetupReader version 2.6.0 [Data set]. HJJB, LLC. Data release v2026-10-20. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-20, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy