Skip to content

Difficulty with align_move - Error in order(m_aligned$timestamp) #147

@mlivernois

Description

@mlivernois

I'm trying to use align_move on the attached dataframe (acoustic telemetry detections):

rsp_example.csv

Here's the code, with the error I can't seem to resolve at the end:

library(moveVis)
library(move2)
library(sf)
rsp_example <- read.csv('rsp_example.csv')
rsp_example$Timestamp <- as.POSIXct(rsp_example$Timestamp, format="%Y-%m-%d %H:%M:%S", tz = "UTC")
move_example <- mt_as_move2(rsp_example,
coords = c("Longitude", "Latitude"),
time_column = "Timestamp",
track_id_column = "Track")
|> sf::st_set_crs(4326L)
align_example <- align_move(m = move_example, res = units::set_units(1, "hour"))
Temporal resolution of 1 [h] is used to align trajectories.
Error in order(m_aligned$timestamp) : argument 1 is not a vector

I can't figure out what's going wrong here. Any ideas? Sorry if this isn't the place to ask this question, since it's probably not a bug - just user error? Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions