charify: Convert certain columns of a data.frame to character type

Description Usage Arguments Value Author(s) Examples

Description

Convert certain columns of a data.frame to character type

Usage

1
charify(dat, cols)

Arguments

dat

data.frame

cols

character. Names of columns to be converted.

Value

data.frame

Author(s)

Kaiyin Zhong, Fan Liu

Examples

1
2
3
4
5
6
7
## Not run: 
x = data.frame(x = 1:3, y= 2:4)
all(colClasses(x) == c("integer", "integer"))
x = charify(x, "x")
all(colClasses(x) == c("character", "integer"))

## End(Not run)

CollapsABEL documentation built on May 1, 2019, 7:28 p.m.