Common Issues
Dealing with Periods in a String
Dealing with Periods in a String
You often need to split a string or edit a string based on the presence of a period. This "special" character requires you to escape it to function
# Using separate
separate(Test, into = c("Tumor", "SourceCaller"), sep = "\\.", remove = TRUE)
# Using stringr replace
mutate(Test = str_replace(Test, "\\.", "-")