Takes a fruit collection data frame, removes value outside range (from, to), and resamples to new index, where 0 in the new index corresponds to "from". For use with 'summarise'.

resample_fruit_task(df, new_time, from = 0, to = Inf)

Arguments

df

A fruit collection data frame. Expected columns: 'time', 'event'

new_time

New time index, with respect to "from"

from

A numerical value of the starting time for resampling (default 0)

to

A numerical value of the end time for resampling (default inf, i.e. end of the data frame)

Value

A resampled movement data frame