Mousetracker to mousetrap import warnings and errors
Hi Pascal,
I'm collaborating with someone that used Freeman's mousetracker and I am trying to process their data in R using mousetrap. I've wrangled their data to match mousetrap's desired structure. The xpos, ypos, and timestamp vectors are character vectors that look like: [x1, x2, x3...x90], [y1, y2, y3...y90], [t1, t2, t3...t90].
When I use mt_import_mousetrap, I get warnings that I don't understand:
# Warning messages: # 1: In FUN(newX[, i], ...) : NAs introduced by coercion.
If I press on passed the warnings with mt_remap_symmetric, I get another error:
# Error in if ((remap_xpos == "left" & trajectories[i, nlogs, xpos] > 0) | : # missing value where TRUE/FALSE needed
And then, no surprise, mt_measures spits out an error:
# Error in points[1, ] : incorrect number of dimensions
Thank you for your help!

Comments
After some exploration and troubleshooting, I resolved my issue.
It seems that scientific notation was responsible for my errors. After multiplying everything by a constant, the errors resolved and everything worked sensibly.
Hi Mike,
glad to hear the issue could be resolved. One thing I just wanted to mention (because it looked to me like you were reading in the processed MouseTracker files): in the mousetrap R package, we also provide the read_mt function (http://pascalkieslich.github.io/mousetrap/reference/read_mt.html) that you can use to read in MouseTracker raw data files (in the .mt format).
Best,
Pascal