divide.Rd
Useful for dividing bio-logging sensor data (Sensors
) and behavioral event
data (Events
) into test-train sets.
divide(object, deployids)
# S4 method for Events
divide(object, deployids)
# S4 method for Sensors
divide(object, deployids)
[list(Events/Sensors)]
A list of two Events
/Sensors
objects.
The first list element contains the deployments with IDs in deployids
,
the second element contains the remainder.
c(lunge_sensors, lunge_events) %<-% load_lunges()
divided_sensors <- divide(lunge_sensors, "bw180905-53")
# A Sensors object with *only* deployment "bw180905-53"
deployments(divided_sensors[[1]])
#> [1] "bw180905-53"
# A Sensors object with the remaining five deployments
deployments(divided_sensors[[2]])
#> [1] "bw180905-49" "bw180905-42" "bw180904-52" "bw180904-48" "bw180904-44"