powered by
NaN
In a matrix or within matrices in a list, replace all NaN matrix values with val.
val.
replaceNaN_byname(a, val = 0)
A matrix or list of matrices in which all NaN are replaced by val.
val
A matrix of list of matrices in which NaN will be replaced by val.
NaNs are replace by val.
suppressWarnings(a <- matrix(c(1, sqrt(-1)))) replaceNaN_byname(a) replaceNaN_byname(a, 42)
Run the code above in your browser using DataLab