I have a dataframe in R which looks like.
Date Art Bst Cde Fet Drt
2020-04-02 100000 14.34 1223400 15.23 12.22
2020-04-04 150000 12.33 103400 11.14 01.22
2020-04-05 1700000 11.45 1000000 17.41 10.22
The class of data frame is [1] "data.table" "data.frame". I want to add the comma after three-digit in columns 2,4 and the % sign in columns 3,5 and 6.
Required output:
Date Art Bst Cde Fet Drt
2020-04-02 100,000 14.34 % 122,340,0 15.23 % 12.22 %
2020-04-04 150,000 12.33 % 103,400 11.14 % 01.22 %
2020-04-05 170,000,0 11.45 % 100,000,0 17.41 % 10.22 %