mablab / sftrack

sftrack: Modern classes for tracking and movement data
https://mablab.org/sftrack/
Other
53 stars 2 forks source link

as_sftrack fails when burst column is already named 'burst' #25

Closed birderboone closed 4 years ago

birderboone commented 4 years ago

This was submitted to me by @rociojoo , and Ill post it here for a record. When the raw data already has a column named 'burst', sftrack is(was) not set up to overwrite it correctly. Instead the burst column is being renamed to 'burst.1'.

Downstream this also means sftrack does not always read the attr(x, 'burst'), and instead occasionally still does data$burst. This would be a good time for me to check that all data$burst have been changed too data[[attr(x,'burst')]]. Also its possible that when this does occur the name of the column ('burst.1') is also not getting stored properly in the 'burst' attribute of the sftrack.

I wont get to this change for a couple of days, however.

birderboone commented 4 years ago

Issue should be resolved with recent commit now. The burst always overwrites the column name 'burst' regardless of whats in it.

basille commented 4 years ago

Is this a temporary fix to get things to work?

18 is still open so I assume it is the case.

birderboone commented 4 years ago

@basille Its temporary in the sense the the name of the variable may change, but the action that Rocio attempted to do should be allowed and handled.

The mechanism that created the error had nothing to do with the name.

basille commented 4 years ago

Good. My comments there still hold then.