CollapsABEL (version 0.10.11)

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

Description

Convert certain columns of a data.frame to character type

Usage

charify(dat, cols)

Arguments

dat
data.frame
cols
character. Names of columns to be converted.

Value

data.frame

Examples

Run this code
## 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)

Run the code above in your browser using DataLab