You can use the recode function for this:
library(tidyverse)
set.seed(2)
x = sample(c("none","mild","moderate","severe"), 100, replace=TRUE)
x_numeric = recode(x, none=0, mild=1, moderate=2, severe=3)
Bear in mind that recoding the values as numeric implicitly assumes that the "distance" between each category is constant.