0

I have a data frame that looks like this: enter image description here

In the "x" column, I want to remove the number values and just have the string character, i.e. "Benign_freq" or "Recessive". Is there a way to edit these values using R?

britney
  • 59
  • 3
  • 1
    It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. Please [do not post code or data in images](https://meta.stackoverflow.com/q/285551/2372064) – MrFlick Jan 05 '23 at 19:35
  • Try `df1$x <- trimws(df1$x, whitespace = "\\d+\\s+")` – akrun Jan 05 '23 at 19:44

0 Answers0