Remove NA/NaN/Inf in a matrix
问题 I want to try two things : How do I remove rows that contain NA/NaN/Inf How do I set value of data point from NA/NaN/Inf to 0. So far, I have tried using the following for NA values, but been getting warnings. > eg <- data[rowSums(is.na(data)) == 0,] Error in rowSums(is.na(data)) : 'x' must be an array of at least two dimensions In addition: Warning message: In is.na(data) : is.na() applied to non-(list or vector) of type 'closure' 回答1: I guess I'll throw my hat into the ring with my