How can I replace .. with .
I tried something like:
names(dataset) <- gsub("[/./.]",".",names(dataset))
But it doesn't work as I hoped.
I think you have your slashes in the wrong direction, and you need to double them:
gsub("\\.\\.",".",names(dataset))
Fixed to reflect comments.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With