% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/variableKey.R
\name{keyRead}
\alias{keyRead}
\title{Read file after deducing file type from suffix.}
\usage{
keyRead(file, ..., na.strings = c("\\\\s+"))
}
\arguments{
\item{file}{name of file to be imported, including path to
file. file name must end in "csv", "xlsx" or "rds"}

\item{...}{additional arguments for read.csv or read.xlsx.}

\item{na.strings}{Values to be converted to R missing symbol
NA. Default is white space, "\\s+".}
}
\value{
A data frame or matrix.
}
\description{
If the input is XLSX, sheets named "key" and "varlab" are
imported if the exist. If input is CSV, then the key
CSV file is imported and another file suffixed with "-varlab" is
imported if it exists.
}
\details{
The variable lables are a named vector saved as an attribute of
the key object.
}
\author{
Paul Johnson <pauljohn@ku.edu>
}
