I want to format tables in in xlsx format and save it to xlsx file .
convert third column in percentage value
mtcars
df <- mtcars[,1:5]
I want to format a table like below and save it to xlsx file.
|
mpg |
cyl |
disp |
hp |
drat |
| Mazda RX4 |
21 |
6 |
160% |
110 |
3.9 |
| Mazda RX4 Wag |
21 |
6 |
160% |
110 |
3.9 |
| Datsun 710 |
22.8 |
4 |
108% |
93 |
3.85 |
| Hornet 4 Drive |
21.4 |
6 |
258% |
110 |
3.08 |
| Hornet Sportabout |
18.7 |
8 |
360% |
175 |
3.15 |
| Total |
104.9 |
30 |
10.46 |
598 |
17.88 |