tests/testthat/test-mt_track_id.R

test_that("multiplication works", {
  expect_s3_class(x <- mt_sim_brownian_motion(t = list(1L:5L, 3L:7L)), "move2")
  suppressMessages(expect_true(x |> mt_track_lines() |> st_geometry() |> st_is("LINESTRING") |> all()))
  suppressMessages(expect_identical(x |> mt_track_lines() |> nrow(), 2L))
  suppressMessages(expect_identical(x |> mt_track_lines(t = mean(time)) |> pull(t), c(3.0, 5.0)))
})

Try the move2 package in your browser

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

move2 documentation built on April 4, 2025, 12:24 a.m.