Learn R Programming

XLConnect (version 0.2-4)

normalizeDataframe: Data frame Normalization for Unit Tests

Description

Normalizes a data.frame with respect to column types. This is necessary for comparing data.frames written to Excel and then read from Excel. Excel does not know e.g. factor types. Factor variables in fact are written to Excel as ordinary strings. Therefore, when read back in to R, they are treated as character variables.

Usage

normalizeDataframe(df)

Arguments

df
data.frame to normalize

Value

  • Returns a normalized data.frame