tests/testthat/plot-persp.R

x <- seq(-10, 10, length = 30)
y <- x
ff <- function(x,y) { r <- sqrt(x^2 + y^2); 10 * sin(r) / r }
z <- outer(x, y, ff)
z[is.na(z)] <- 1
for (i in 1:3) {
  persp(x, y, z, phi = 30 + i * 10, theta = 30)
}

Try the evaluate package in your browser

Any scripts or data that you put into this service are public.

evaluate documentation built on Nov. 2, 2023, 5:18 p.m.