ctmm-initiative / ctmmweb

Web app for analyzing animal tracking data, built upon ctmm R package
http://biology.umd.edu/movement.html
GNU General Public License v3.0
32 stars 21 forks source link

individual plot 3 cannot deal with single animal data #7

Closed xhdong-umd closed 7 years ago

xhdong-umd commented 7 years ago

Because the code relied on the name of list items from ext_list <- lapply(tele_objs, extent, level = level), simply wrap single object with list(tele_objs) still don't have the animal name in it.

The individual plot itself doesn't add value for single animal data, but the quantile slider in this plot is still useful so we still want it to work.

The ideal solution is to have as.telemetry always return a list even for single animal. If that is not feasible, I will extract the animal name from the telemetry object or the name column in merged data frame.

xhdong-umd commented 7 years ago

Added helper function to wrap single object and fixed problem. Changing it in ctmm will have quite substantial impact. Still possible but need more consideration.