col2percent {metools} | R Documentation |
col2percent transform columns to percent.
col2percent(x, start, end = ncol(x), mult100 = FALSE)
x |
a dataframe |
start |
number of start column |
end |
number of last column (default=last) |
mult100 |
multiply by 100 if the number is a decimal fraction(T or F)(default=F) |
Return a dataframe with transformed columns.
v=data.frame(c(15,5,20,50,10))
col2percent(v,start=1)
v=data.frame(c(0.15,0.05,0.2,0.5,0.1))
col2percent(v,start=1,mult100=TRUE)