amtThis vignette briefly introduces how one can coerce
amt track_xy* to other commonly used packages. At the
moment this vignette shows methods to coerce to
adehabitatHR, ctmm, and move.
First we load the required libraries and the relocation data (called
deer)
## [1] "track_xyt" "track_xy" "tbl_df" "tbl" "data.frame"
## # A tibble: 826 × 4
## x_ y_ t_ burst_
## * <dbl> <dbl> <dttm> <dbl>
## 1 4314068. 3445807. 2008-03-30 00:01:47 1
## 2 4314053. 3445768. 2008-03-30 06:00:54 1
## 3 4314105. 3445859. 2008-03-30 12:01:47 1
## 4 4314044. 3445785. 2008-03-30 18:01:24 1
## 5 4313015. 3445858. 2008-03-31 00:01:23 1
## 6 4312860. 3445857. 2008-03-31 06:01:45 1
## 7 4312854. 3445856. 2008-03-31 12:01:11 1
## 8 4312858. 3445858. 2008-03-31 18:01:55 1
## 9 4312745. 3445862. 2008-04-01 00:01:24 1
## 10 4312651. 3446024. 2008-04-01 06:00:54 1
## # ℹ 816 more rows
adehbatit*## [1] "ltraj" "list"
##
## *********** List of class ltraj ***********
##
## Type of the traject: Type II (time recorded)
## * Time zone: UTC *
## Irregular traject. Variable time lag between two locs
##
## Characteristics of the bursts:
## id burst nb.reloc NAs date.begin date.end
## 1 animal_1 animal_1 826 0 2008-03-30 00:01:47 2009-04-28 00:00:21
##
##
## infolocs provided. The following variables are available:
## [1] "pkey"
ctmmWith the function as_telemetry a track_xyt
can be coerced to a telemetry object used in
ctmm.
## [1] "telemetry"
## attr(,"package")
## [1] "ctmm"
## timestamp longitude latitude t x y
## 1 2008-03-30 00:01:47 9.894014 54.11902 1206835307 787.90305 -12.44959
## 2 2008-03-30 06:00:54 9.893777 54.11867 1206856854 805.32874 -50.41675
## 3 2008-03-30 12:01:47 9.894574 54.11948 1206878507 775.82955 49.58711
## 4 2008-03-30 18:01:24 9.893642 54.11883 1206900084 786.89412 -44.95229
## 5 2008-03-31 00:01:23 9.877903 54.11946 1206921683 26.94402 -739.21455
## 6 2008-03-31 06:01:45 9.875533 54.11945 1206943305 -79.03065 -851.89042
sfThere are three functions that convert tracks/steps to tibbles with a
geometry columns (sf-objects).
as_sf() converts a track or steps to a point geometry,
by calling that the function as_sf_points(). For steps the
end points of steps is used by default. Setting end = FALSE
will use the start points.as_sf_point()It is possible to convert a track and steps to tibble with a geometry column using the function `as_sf
move## ─ Session info ───────────────────────────────────────────────────────────────
## setting value
## version R version 4.6.0 (2026-04-24)
## os Ubuntu 24.04.4 LTS
## system x86_64, linux-gnu
## ui X11
## language (EN)
## collate en_US.UTF-8
## ctype en_US.UTF-8
## tz Etc/UTC
## date 2026-05-13
## pandoc 3.8.3 @ /usr/local/bin/ (via rmarkdown)
## quarto 1.9.37 @ /usr/local/bin/quarto
##
## ─ Packages ───────────────────────────────────────────────────────────────────
## package * version date (UTC) lib source
## ade4 1.7-24 2026-03-21 [2] RSPM (R 4.6.0)
## adehabitatLT 0.3.29 2025-06-17 [2] RSPM (R 4.6.0)
## adehabitatMA 0.3.17 2024-09-06 [2] RSPM (R 4.6.0)
## amt * 0.3.1.0 2026-03-14 [1] https://jmsigner.r-universe.dev (R 4.6.0)
## backports 1.5.1 2026-04-03 [2] RSPM (R 4.6.0)
## boot 1.3-32 2025-08-29 [2] RSPM (R 4.6.0)
## bslib 0.10.0 2026-01-26 [2] RSPM (R 4.6.0)
## buildtools 1.0.0 2026-05-12 [3] local (/pkg)
## cachem 1.1.0 2024-05-16 [2] RSPM (R 4.6.0)
## checkmate 2.3.4 2026-02-03 [2] RSPM (R 4.6.0)
## circular 0.5-2 2025-09-25 [2] RSPM (R 4.6.0)
## class 7.3-23 2025-01-01 [2] RSPM (R 4.6.0)
## classInt 0.4-11 2025-01-08 [2] RSPM (R 4.6.0)
## cli 3.6.6 2026-04-09 [2] RSPM (R 4.6.0)
## codetools 0.2-20 2024-03-31 [5] CRAN (R 4.4.0)
## ctmm 1.3.0 2025-07-26 [2] RSPM (R 4.6.0)
## data.table 1.18.4 2026-05-06 [2] RSPM (R 4.6.0)
## DBI 1.3.0 2026-02-25 [2] RSPM (R 4.6.0)
## DEoptimR 1.1-4 2025-07-27 [2] RSPM (R 4.6.0)
## digest 0.6.39 2025-11-19 [2] RSPM (R 4.6.0)
## dplyr * 1.2.1 2026-04-03 [2] RSPM (R 4.6.0)
## e1071 1.7-17 2025-12-18 [2] RSPM (R 4.6.0)
## evaluate 1.0.5 2025-08-27 [2] RSPM (R 4.6.0)
## farver 2.1.2 2024-05-13 [2] RSPM (R 4.6.0)
## fastmap 1.2.0 2024-05-15 [2] RSPM (R 4.6.0)
## fitdistrplus 1.2-6 2026-01-24 [2] RSPM (R 4.6.0)
## generics 0.1.4 2025-05-09 [2] RSPM (R 4.6.0)
## ggforce 0.5.0 2025-06-18 [2] RSPM (R 4.6.0)
## ggplot2 * 4.0.3 2026-04-22 [2] RSPM (R 4.6.0)
## ggraph * 2.2.2 2025-08-24 [2] RSPM (R 4.6.0)
## ggrepel 0.9.8 2026-03-17 [2] RSPM (R 4.6.0)
## glue 1.8.1 2026-04-17 [2] RSPM (R 4.6.0)
## Gmedian 1.2.7 2022-06-08 [2] RSPM (R 4.6.0)
## graphlayouts 1.2.3 2026-02-21 [2] RSPM (R 4.6.0)
## gridExtra 2.3 2017-09-09 [2] RSPM (R 4.6.0)
## gtable 0.3.6 2024-10-25 [2] RSPM (R 4.6.0)
## htmltools 0.5.9 2025-12-04 [2] RSPM (R 4.6.0)
## igraph 2.3.1 2026-05-04 [2] RSPM (R 4.6.0)
## jquerylib 0.1.4 2021-04-26 [2] RSPM (R 4.6.0)
## jsonlite 2.0.0 2025-03-27 [2] RSPM (R 4.6.0)
## KernSmooth 2.23-26 2025-01-01 [2] RSPM (R 4.6.0)
## knitr * 1.51 2025-12-20 [2] RSPM (R 4.6.0)
## labeling 0.4.3 2023-08-29 [2] RSPM (R 4.6.0)
## lattice 0.22-9 2026-02-09 [2] RSPM (R 4.6.0)
## lifecycle 1.0.5 2026-01-08 [2] RSPM (R 4.6.0)
## lubridate * 1.9.5 2026-02-04 [2] RSPM (R 4.6.0)
## magrittr 2.0.5 2026-04-04 [2] RSPM (R 4.6.0)
## maketools 1.3.2 2025-01-25 [3] RSPM (R 4.6.0)
## MASS 7.3-65 2025-02-28 [2] RSPM (R 4.6.0)
## Matrix 1.7-5 2026-03-21 [2] RSPM (R 4.6.0)
## memoise 2.0.1 2021-11-26 [2] RSPM (R 4.6.0)
## mvtnorm 1.3-7 2026-04-15 [2] RSPM (R 4.6.0)
## pillar 1.11.1 2025-09-17 [2] RSPM (R 4.6.0)
## pkgconfig 2.0.3 2019-09-22 [2] RSPM (R 4.6.0)
## polyclip 1.10-7 2024-07-23 [2] RSPM (R 4.6.0)
## proxy 0.4-29 2025-12-29 [2] RSPM (R 4.6.0)
## purrr 1.2.2 2026-04-10 [2] RSPM (R 4.6.0)
## R6 2.6.1 2025-02-15 [2] RSPM (R 4.6.0)
## raster 3.6-32 2025-03-28 [2] RSPM (R 4.6.0)
## rbibutils 2.4.1 2026-01-21 [2] RSPM (R 4.6.0)
## RColorBrewer 1.1-3 2022-04-03 [2] RSPM (R 4.6.0)
## Rcpp 1.1.1-1.1 2026-04-24 [2] RSPM (R 4.6.0)
## Rdpack 2.6.6 2026-02-08 [2] RSPM (R 4.6.0)
## rlang 1.2.0 2026-04-06 [2] RSPM (R 4.6.0)
## rmarkdown * 2.31 2026-03-26 [2] RSPM (R 4.6.0)
## robustbase 0.99-7 2026-02-05 [2] RSPM (R 4.6.0)
## RSpectra 0.16-2 2024-07-18 [2] RSPM (R 4.6.0)
## S7 0.2.2 2026-04-22 [2] RSPM (R 4.6.0)
## sass 0.4.10 2025-04-11 [2] RSPM (R 4.6.0)
## scales 1.4.0 2025-04-24 [2] RSPM (R 4.6.0)
## sessioninfo 1.2.3 2025-02-05 [2] RSPM (R 4.6.0)
## sf 1.1-1 2026-05-06 [2] RSPM (R 4.6.0)
## sp 2.2-1 2026-02-13 [2] RSPM (R 4.6.0)
## survival 3.8-6 2026-01-16 [2] RSPM (R 4.6.0)
## sys 3.4.3 2024-10-04 [2] RSPM (R 4.6.0)
## terra 1.9-27 2026-05-10 [2] RSPM (R 4.6.0)
## tibble 3.3.1 2026-01-11 [2] RSPM (R 4.6.0)
## tidygraph * 1.3.1 2024-01-30 [2] RSPM (R 4.6.0)
## tidyr 1.3.2 2025-12-19 [2] RSPM (R 4.6.0)
## tidyselect 1.2.1 2024-03-11 [2] RSPM (R 4.6.0)
## timechange 0.4.0 2026-01-29 [2] RSPM (R 4.6.0)
## tweenr 2.0.3 2024-02-26 [2] RSPM (R 4.6.0)
## units 1.0-1 2026-03-11 [2] RSPM (R 4.6.0)
## utf8 1.2.6 2025-06-08 [2] RSPM (R 4.6.0)
## vctrs 0.7.3 2026-04-11 [2] RSPM (R 4.6.0)
## viridis 0.6.5 2024-01-29 [2] RSPM (R 4.6.0)
## viridisLite 0.4.3 2026-02-04 [2] RSPM (R 4.6.0)
## withr 3.0.2 2024-10-28 [2] RSPM (R 4.6.0)
## xfun 0.57 2026-03-20 [2] RSPM (R 4.6.0)
## yaml 2.3.12 2025-12-10 [2] RSPM (R 4.6.0)
##
## [1] /tmp/RtmpLDbI7A/Rinst167c5ed2b13f
## [2] /github/workspace/pkglib
## [3] /usr/local/lib/R/site-library
## [4] /usr/lib/R/site-library
## [5] /usr/lib/R/library
## * ── Packages attached to the search path.
##
## ──────────────────────────────────────────────────────────────────────────────