tests/testit/test-independent-gridpts.R

assert("compare gridpts results with gsDesign::normalGrid results", {
  x1 <- gsDesign2:::gridpts(r = 18, mu = 4, a = -Inf, b = Inf)
  x2 <- gsDesign::normalGrid(r = 18, bounds = c(-40, 40), mu = 4, sigma = 1)
  (all.equal(x1$w, x2$gridwgts))
  (all.equal(x1$z, x2$z))

  x1 <- gsDesign2:::gridpts(r = 18, mu = 2, a = -Inf, b = Inf)
  x2 <- gsDesign::normalGrid(r = 18, bounds = c(-40, 40), mu = 2, sigma = 1)
  (all.equal(x1$w, x2$gridwgts))
  (all.equal(x1$z, x2$z))
})

Try the gsDesign2 package in your browser

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

gsDesign2 documentation built on July 1, 2026, 1:08 a.m.