colpct2num {metools}R Documentation

Remove percent from a column, and transform in number

Description

When use col2percent function to add a percent in a column, the type of this column now is character, colpct2num function remove percent from this column and transform in number.

Usage

colpct2num(x, start, end = ncol(x), div100 = TRUE)

Arguments

x

a dataframe

start

number of start column

end

number of last column (default=last)

div100

division by 100 (T or F)(default=T)

Value

Return a dataframe with transformed columns.

Examples

v=data.frame(c(15,5,20,50,10))
v=col2percent(v,start=1)
v=colpct2num(v,start=1,div100=TRUE)


[Package metools version 1.0.0 Index]