colClasses: Coerces data.frame columns to the specified classes

Description Usage Arguments Examples

View source: R/colClasses.r

Description

Coerces data.frame columns to the specified classes

Usage

1

Arguments

d

A data.frame.

colClasses

A vector of column attributes, one of: numeric, factor, character, etc.

Examples

1
2
3
dat <- data.frame(xvar = seq(1:10), yvar = rep(c("a","b"),5)) # make a data.frame
str(dat)
str(colClasses(dat, c("factor","factor")))

sckott/sacbox documentation built on May 26, 2017, 3:47 a.m.