Here is data:
set.seed(123)
mat <- matrix(rnorm(5000, 0.5, 0.2), 50)
heatmap (mat)

mat[mat > 0.05] <- NA
heatmap (mat)
Error in hclustfun(distfun(x)) :
NA/NaN/Inf in foreign function call (arg 11)
By replacing with other values (arbitrary can help) but it can trick the readers as it will pick color from the same scale, which is not true. So I want to put completely different color for those value greater than 0.05.
mat[mat > 0.05] <- 0.1
heatmap (mat)

maybe…
Basically play around with
col=andbreaks=looks like: