Skip to content

Refactor data processing in RunResidenceExtraction#34

Open
ecologistpablo wants to merge 1 commit into
RossDwyer:masterfrom
ecologistpablo:master
Open

Refactor data processing in RunResidenceExtraction#34
ecologistpablo wants to merge 1 commit into
RossDwyer:masterfrom
ecologistpablo:master

Conversation

@ecologistpablo

Copy link
Copy Markdown

Combined code for residency / non-residency into a function, to update RunResExtraction in VTrack with vectorised tidyverse functions instead of baseR.

Have residency rather similar as before, have non-residency into rows that differentiate between arrivals and departures compared to old RunResidenceExtraction. Some simple dplyr wrestling can alter this to squish it back into a single row.

To use the new function you need:

datetime: POSIXct

location: character

longitude: numeric

latitude: numeric

station_name : character

sex: character

Accessing outputs is the same as before:

residency <- RunResData$residences # residence events, with sex + duration_secs + n_detections
reslog <- RunResData$residenceslog # detection-level log
movement <- RunResData$nonresidences # long arrival/departure rows, with sex + distance (km)

Combined code for residency / non-residency into a function, to update RunResExtraction in VTrack with vectorised tidyverse functions instead of baseR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant