fork download
  1. row1 <- c("AA.8.BB.CCCC", "2017","3.166.5","3.080.2","68", "185.223.632.4", "500.332.1")
  2. gsub("(?<=\\d)[.](?=\\d{3}[.])", ",", row1, perl=TRUE)
Success #stdin #stdout 0.2s 39708KB
stdin
Standard input is empty
stdout
[1] "AA.8.BB.CCCC"  "2017"          "3,166.5"       "3,080.2"      
[5] "68"            "185,223,632.4" "500,332.1"