0

In one column of my dataset the assignment of a record to a phase is listed. Phase I (I), Phase II (I), Phase III (I). Each dataset has an assignment, in the evaluation there seems to be another value that I can't locate. This gives an error in the evaluation. I can't find the dataset in question. I would either exclude it, make it an NA value, or assign it to a phase if necessary. Do you have a tip on how I can proceed, apparently there is no record with the weird "blank" value either?

> summary(May_Filter_2$Phase)
      I II III 
  0 424 850 975 

Best, Roman

Roman
  • 1
  • 3
  • You have blank as a factor level "". Drop unused factor levels, see linked post. Try: `summary(droplevels(May_Filter_2$Phase))` – zx8754 May 13 '22 at 08:56

1 Answers1

0

I don't have you dataset, so I don't really know if this function could help to fix your problem. You can use this simple code to substitute na value with 0 (or with whatever you want).

May_Filter_2[is.na(May_Filter_2)] <- 0
Inuraghe
  • 564
  • 3
  • 13