File: cleanDataFrame.Rd

package info (click to toggle)
r-cran-kutils 1.73%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,648 kB
  • sloc: sh: 13; makefile: 2
file content (36 lines) | stat: -rw-r--r-- 1,251 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/variableKey.R
\name{cleanDataFrame}
\alias{cleanDataFrame}
\title{Check and Clean data.frame for usage with variable key functions}
\usage{
cleanDataFrame(dframe, safeNumericToInteger = TRUE, trimws = "both")
}
\arguments{
\item{dframe}{A data frame}

\item{safeNumericToInteger}{Default TRUE: Should we treat values
which appear to be integers as integers? If a column is
numeric, it might be safe to treat it as an integer.  In many
csv data sets, the values coded c(1, 2, 3) are really
integers, not floats c(1.0, 2.0, 3.0). See \code{safeInteger}.}

\item{trimws}{Defaults as "both", in meaning of \code{which}
argument in \code{trimws} function.  Set as NULL if character
variables must not be trimmed to eliminate white
space. Otherwise, value should be one of \code{c("left",
"right", "both")}.}
}
\value{
A checked and cleaned data frame
}
\description{
Checks that the data.frame is made up of simple individual
columns. Checks numeric columns to find out if they are acceptable
to treat as integers. If they are acceptable to treat as integers,
then convert those numeric to integer class variables.
}
\author{
Paul Johnson <pauljohn@ku.edu>
}
\keyword{internal}