I have a dataframe as follows:
A B C D E F G
AA 1 2 3 4 5 6
BB 3 2 1 9 23 2.6
CC 2 5 1 1.9 2.5 2.99
How do I change this framework so that all columns are converted to dollar format using a weight package? For a single column, I can simply do this:
library(scales)
df$B<-dollar(df$B)
How to do this for all columns except the first without re-writing this message for each column?
source
share