# mt_measures error: Error in points[1, ] : incorrect number of dimensions

We collected data from about 80 participants with no problems using mt_measures, but for some reason adding the 81st participant's .csv file leads to the following error when using mt_measures:

mt_measures(dta.mt, verbose=TRUE)

Start calculating deviations of actual from idealized response trajectory.

100 trials finished

200 trials finished

300 trials finished

400 trials finished

500 trials finished

600 trials finished

700 trials finished

800 trials finished

Error in points[1, ] : incorrect number of dimensions

Question 1) When I open the .csv in Excel, I don't see any obvious problems, and I'm not sure how to identify what might be wrong with the underlying .csv file based on the error message (dimensions of ___?).

Question 2) I'm also wondering how I can input custom coordinates for target locations (endpoints) to be used for calculating deviations from the idealized trajectory, and whether this might help. I see how to do this globally (i.e., if all targets had the same endpoint), but I'm wondering if it's possible to specify different endpoints by target (there are 15 different targets, each with a different ideal endpoint).

Thanks!

J

## Comments

I think I found the .csv problem (Question 1 above): one participant has only 2 points in the timestamps and x and y position columns (maybe an immediate click when the trial started?) for 2 of the 15 or so trials. Is there a way to omit these trajectories on import?

Hi J,

regarding question 1: you identified the problem correctly - you need more than 2 recorded positions.

Mousetrap provides a function for counting the number of recorded positions which can then be used to exclude the trials. An example could look like this:

Best,

Pascal

Regarding question 2: indvidual ideal end points per trial (other than the actual start and end points, that are ued by default) are so far not implemented in mt_deviations. As a workaround, you could create subsets of the data using mt_subset for each target that has a different ideal start and end point and run mt_deviations separately for each subset.