I have an example 5x5 matrix with the following values:
dat <- matrix(seq(1,13,0.5), nrow=5, byrow=TRUE)
dat[seq(2,25,2)] <- NA
1 | NA | 2 | NA | 3
NA | 4 | NA | 5 | NA
6 | NA | 7 | NA | 8
NA | 9 | NA | 10 | NA
11 | NA | 12 | NA | 13
I canβt get a 3D surface graph for life using, for example, persp3d () due to missing values. Isn't there a way for R to simply interpolate the values ββand still plot them?
source
share