I want to change the "." in the middle of each character name to _, but I dont know how to specify that when there are several ".". Does anyone have a suggestion?
Another problem is that it doesnt seem to like the "." When I try to change all "." to _, it doesnt work. How to handle this?
From: "L234.346546.24.3654" "L34.547567.78.79878" "L456.7474.22.07806"
Expected outcome:
"L234.346546_24.3654" "L34.547567_78.79878" "L456.7474_22.07806"
v <- c("L234.346546.24.3654", "L34.547567.78.79878", "L456.7474.22.07806")
vv <- gsub(".", "_", v)
vv
[1] "___________________" "___________________" "__________________"
Thanks!