Learn R Programming

metools (version 1.0.0)

col2char: Transform defined columns to character.

Description

col2char transform columns type to character.

Usage

col2char(x, start, end = ncol(x))

Arguments

x

a dataframe

start

number of start column

end

number of last column (default=last)

Value

Return a dataframe with transformed columns.

Examples

Run this code
# NOT RUN {
v=data.frame(c(3,2,5,6,5,4))
class(v[,1]) #here class is numeric
v=col2char(v,1)
class(v[,1]) #now class is character

# }

Run the code above in your browser using DataLab