trettenbrein / OpenPoseR

Analyze motion-tracking data derived from video files using OpenPose.
GNU General Public License v3.0
9 stars 3 forks source link

Automatic detection of model type fails in file_clean() for models other than BODY25 #9

Closed trettenbrein closed 3 years ago

trettenbrein commented 3 years ago

When not specifying a model, the automatic detection of the model based on the file name fails when using a model other than BODY25. The following error is shown:

Error in if (as.logical(grep("_body25", file)) == TRUE) { : argument is of length zero

A possible reason for this is that the check is implemented in an incorrect way in several files, apparently using grep (and not grepl) which in this case will return 0.

As the same check is used also in other functions this issue should be checked and fixed everywhere.