I am trying to convert NaN
into zeroes. And, the code I am using is as follows
myfiles6 <- lapply(myfiles6, function(x) {x[is.nan(x)] <- 0; x})
but it gives an error as
Error in is.nan(x) : default method not implemented for type 'list'
What could be the solution?