0

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

jpsmith
  • 11,023
  • 5
  • 15
  • 36
  • Welcome to SO Omonigho Ogolo. Please run `dput(PTspei)` and add the result to your question. Also, please include the breaks as defined by "spei_level" too. This will make answering your question much easier. Thanks – L Tyrone May 13 '23 at 22:58
  • Please provide enough code so others can better understand or reproduce the problem. – Community May 15 '23 at 07:13

0 Answers0