'R column with a strange value [duplicate]

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



Solution 1:[1]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Inuraghe