col2num {metools}R Documentation

Transform defined columns to numeric.

Description

col2num transform columns type to numeric.

Usage

col2num(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

v=data.frame(c('3','2','5','6','5','4'))
class(v[,1]) #here class is factor
v=col2num(v,1)
class(v[,1]) #now class is character


[Package metools version 1.0.0 Index]