aharmer / pathtrackr

An R package for video tracking and analysing animal movement
29 stars 8 forks source link

How to use generate path.list object with x,y coordinate data. #36

Open bittulab opened 3 years ago

bittulab commented 3 years ago

I already have x, y pixel coordinate data of animal movement, can I generate path.list object for further analysis?

aharmer commented 1 year ago

Hi,

The trackPath function returns a list containing:

list(position = cbind(xpos, ypos), dim.pix = c(bg.dim[2], bg.dim[1]), dim.arena = c(xarena, yarena), fps = fps, movement = movement, total.distance = total.distance, mean.velocity = mean.velocity, total.duration = total.duration, breaks = breaks)

The xy co-ordinates are stored in the first element, so you could manually create this object from your existing data. Depending on what other functions you want to use, you may need to fill in some of the other elements too.

Hope this helps, Aaron.