Rev 6852 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% This file is part of the 'foreign' package for R% It is distributed under the GPL version 2 or later\name{read.epiinfo}\alias{read.epiinfo}\title{Read Epi Info Data Files}\description{Reads data files in the \code{.REC} format used by Epi Info versions 6and earlier and by EpiData. Epi Info is a public domain database andstatistics package produced by the US Centers for Disease Controland EpiData is a freely available data entry and validation system.}\usage{read.epiinfo(file, read.deleted = FALSE, guess.broken.dates = FALSE,thisyear = NULL, lower.case.names = FALSE)}\arguments{\item{file}{A filename, URL, or connection.}\item{read.deleted}{Deleted records are read if \code{TRUE}, omittedif \code{FALSE} or replaced with \code{NA} if \code{NA}.}\item{guess.broken.dates}{Attempt to convert dates with 0 or 2 digityear information (see \sQuote{Details}).}\item{thisyear}{A 4-digit year to use for dates with no year. Defaultsto the current year.}\item{lower.case.names}{Convert variable names to lowercase?}}\details{Epi Info allows dates to be specified with no year or with a 2 or 4digits. Dates with four-digit years are always converted to\code{Date} class. With the \code{guess.broken.dates} option the functionwill attempt to convert two-digit years using the operating system'sdefault method (see \link{Date}) and will use the currentyear or the \code{thisyear} argument for dates with no yearinformation.If \code{read.deleted} is \code{TRUE} the \code{"deleted"} attributeof the data frame indicates the deleted records.}\note{Some later versions of Epi Info use the Microsoft Access fileformat to store data. That may be readable with the \pkg{RODBC} package.}\value{A data frame.}\references{\url{https://www.cdc.gov/epiinfo/},\url{http://www.epidata.dk}}\seealso{\link{DateTimeClasses}}\examples{\dontrun{## That file is not availableread.epiinfo("oswego.rec", guess.broken.dates = TRUE, thisyear = "1972")}}\keyword{ file }