I am working using this Rstudio code
drought_severity <- cut(PTspei, breaks = spei_level, labels = c("D4","D3","D2","D1", "N","W1"))
The error message I received is
Error in cut.default(PTspei, breaks = spei_level, labels = c("D4", "D3", : 'x' must be numeric.
kindly advise .
to generate drought severity. I have tried transforming the data X to numeric but couldnt get the result