I need to separate a column in a dataframe that has this format: "0.70.7", "0.20.2", "10.610.6". The final result should be "0.7", "0.2","10.6" but I don't have a character or space that I can use as a wildcard. I try
df <-df %>% separate(`column 00-24`, into = c("Data", "Duplicate"), sep = "", remove = TRUE, convert = FALSE, extra = "merge")
But results is not what I'm looking for. Also try:
df$column_clean <- gsub("(\\..*?)\\.", "\\1", df$`column 00-24`)
But again incorrect output.