Here is a quick example that might help you. I had to guess at the form of the scores and their range because you did not supply any data. If you are still stuck, please post some data. You can use the dput function to do that. Run
dput(head(DF))
where you replace DF with the actual name of your data frame. Post the output of that between lines consisting of three back ticks.
```
Your output
```
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
library(stringr)
Df <- data.frame(Score = c("Grade 2", "Mid 3", "Late 4", "Grade 2"))
Df
#> Score
#> 1 Grade 2
#> 2 Mid 3
#> 3 Late 4
#> 4 Grade 2
Df <- Df %>% mutate(GradeNumber = str_extract(Score, "\\d"),
Quality = ifelse(GradeNumber >= "3", "Good", "Bad"))
Df
#> Score GradeNumber Quality
#> 1 Grade 2 2 Bad
#> 2 Mid 3 3 Good
#> 3 Late 4 4 Good
#> 4 Grade 2 2 Bad
Created on 2021-09-10 by the reprex package (v0.3.0)