Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Warning in regularize.values during mt_resample

When I run mt_resample , I get the following warings:

Warning in regularize.values(x, y, ties, missing(ties)) :
  collapsing to unique 'x' values
Warning in regularize.values(x, y, ties, missing(ties)) :
  collapsing to unique 'x' values
Warning in regularize.values(x, y, ties, missing(ties)) :
  collapsing to unique 'x' values

Can I simply ignore them?

I've attached a single trajectory to this post. Here is the code I used:

mt_trial_with_warning <- readRDS('mt_trial_with_warning.rds')
mt_trial_with_warning <- mt_resample(mt_trial_with_warning, step_size = 20)

My R version is 3.6.1, mousetrap's is 3.1.4.


Comments

  • Hi there,

    I think the problem might be caused by the fact that some of your trajectories do not contain unique time stamp values (i.e., there are trials where a specific timestamp value occurs multiple times).

    Depending on the import function that you use to get your data into mousetrap, this problem should either not occur at all (because mt_import_mousetrap removes duplicate timestamps by default, see argument duplicates http://pascalkieslich.github.io/mousetrap/reference/mt_import_mousetrap.html) or you would have to exclude duplicate timestamps in your raw data, e.g., if you are using mt_import_long.

    Best,

    Pascal

  • edited August 2020

    I used mt_import_wideto import data. I've now deleted the duplicate timestamps prior to importing and now the warnings are gone.


    Thank you for the help, @Pascal!

  • Hi Pascal or @kalenkovich,

    I'm using mt_import_long. How did you remove duplicates before import? I've had an eyeball and I don't think there are any duplicates so not sure why I'm getting this error.


    Thanks in advance!

  • Hi there,

    I am not sure which specific error message you refer to, as mt_import_long does not check for duplicates. Could you post the error message and your code here?

    Best regards,

    Pascal

Sign In or Register to comment.