col2num: Transform defined columns to numeric.

Description Usage Arguments Value Examples

View source: R/col2num.R

Description

col2num transform columns type to numeric.

Usage

1
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

1
2
3
4
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

metools documentation built on July 2, 2020, 2:28 a.m.

Related to col2num in metools...