powered by
col2percent transform columns to percent.
col2percent(x, start, end = ncol(x), mult100 = FALSE)
a dataframe
number of start column
number of last column (default=last)
multiply by 100 if the number is a decimal fraction(T or F)(default=F)
Return a dataframe with transformed columns.
# NOT RUN { 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) # }
Run the code above in your browser using DataLab