You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use the mt_derivates() and mt_angles() function on an example dataset that only contained one trial (trajectories matrix shape was 1x100x3). The mt_derivates function worked as intended, but the mt_angles function failed with the error message:
Error in getAnglesP(trajectories[, , dimensions[1]], trajectories[, , (MouseTrap_Feature_Validation.R#42): Not a matrix.
When adding more trials to the dataset (e.g. trajectory matrix shape 4x100x3), the mt_angles() function worked as intended. I tried to fix the bug by myself and create a pull request, but unfortunately im an R beginner.
The text was updated successfully, but these errors were encountered:
Thanks for bringing this up. Yes, the edge case of a trajectory array that contains only a single trajectory (which I believe is in practice very rare) can cause issues in some of the mousetrap functions as R by default drops dimensions of arrays which have only one level. We try to capture this edge case in many of the functions - however, this was not the case for mt_angles so far. I fixed it now. It will be included in the next CRAN release. However, this might still be some time away, so feel free to use the development version from GitHub in the meantime.
I tried to use the mt_derivates() and mt_angles() function on an example dataset that only contained one trial (trajectories matrix shape was 1x100x3). The mt_derivates function worked as intended, but the mt_angles function failed with the error message:
Error in getAnglesP(trajectories[, , dimensions[1]], trajectories[, , (MouseTrap_Feature_Validation.R#42): Not a matrix.
When adding more trials to the dataset (e.g. trajectory matrix shape 4x100x3), the mt_angles() function worked as intended. I tried to fix the bug by myself and create a pull request, but unfortunately im an R beginner.
The text was updated successfully, but these errors were encountered: