How to replace "." that is located within numbers with ",", but not replace "." located elsewhere?
Input data:
x_input="23.344,) abcd, 12899.2, (, efg; abef. gfdc."
Expected ouput:
x_output
"23,344,) abcd, 12899,2, (, efg; abef. gfdc."
I tried:
x_input<-"23.344,) abcd, 12899.2, (, efg; abef. gfdc."
x_output<-gsub(".", ",", x_input))))
But this does not work.
Thanks in advance.