From 456e7ffa85a00b9a1f8e2a252b1693dc36832729 Mon Sep 17 00:00:00 2001 From: Frederick Solt Date: Mon, 25 Jun 2018 07:24:41 -0500 Subject: [PATCH] add doc for read_ascii() --- man/read_ascii.Rd | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 man/read_ascii.Rd diff --git a/man/read_ascii.Rd b/man/read_ascii.Rd new file mode 100644 index 0000000..9d3d71e --- /dev/null +++ b/man/read_ascii.Rd @@ -0,0 +1,42 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/read_ascii.R +\name{read_ascii} +\alias{read_ascii} +\title{Read ASCII datasets downloaded from the Roper Center} +\usage{ +read_ascii(file, total_cards = 1, var_names, var_cards = 1, var_positions, + var_widths) +} +\arguments{ +\item{file}{A path to an ASCII data file.} + +\item{total_cards}{For multicard files, the number of cards in the file.} + +\item{var_names}{A string vector of variable names.} + +\item{var_cards}{For multicard files, a numeric vector of the cards on which \code{var_names} are recorded.} + +\item{var_positions}{A numeric vector of the column positions in which \code{var_names} are recorded.} + +\item{var_widths}{A numeric vector of the widths used to record \code{var_names}.} +} +\value{ +A data frame containing the variables specified in the \code{var_names} argument, plus a numeric \code{respondent} identifier and as many string \code{card} variables (\code{card1}, \code{card2}, ...) as specified by the \code{total_cards} argument. +} +\description{ +\code{read_ascii} helps format ASCII data files downloaded from the Roper Center. +} +\details{ + +} +\examples{ +\dontrun{ +gallup9206 <- read_ascii(file = "roper_data/USAIPOGNS1992-222054/USAIPOGNS1992-222054.dat", + total_cards = 4, + var_names = c("q24", "weight"), + var_cards = c(4, 1), + var_positions = c(46, 13), + var_widths = c(1, 3)) +} + +}