tests/testthat/test-manifold_reduction.R

context("manifold_reduction")

test_that("manifold_reduction works",{
  skip_if_not_installed('nat')
  library(nat)
  x=read.im3d("testdata/testneurons_thresh.nrrd")
  xyz=ind2coord(x)
  xyzm=manifold_reduction(t(xyz), no_iterations = 15, neighbourhood_size = 20)
  expect_known_value(xyzm, file = 'testdata/xyzm.rds')

  # warn for fishy points dimensions
  expect_warning(manifold_reduction(xyz, no_iterations = 1))
})
jefferis/manifoldreduction documentation built on Oct. 25, 2019, 8:03 a.m.