active_group: Access the active_group value

Description Usage Arguments Examples

View source: R/burst_tj.R

Description

The active group is the combination of group names to group the data sets. The active_group acts essentially like a paste(names_of_groups, sep = '_') grouping variable.

Usage

1

Arguments

x

a c_grouping

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#'
data("raccoon")
raccoon$timestamp <- as.POSIXct(raccoon$timestamp, "EST")
burstz <- list(id = raccoon$animal_id, month = as.POSIXlt(raccoon$timestamp)$mon)
mb1 <- make_c_grouping(x = burstz, active_group = c("id", "month"))

# see the current active burst
active_group(mb1)

# change the active burst
active_group(mb1) <- "id"

# Using a full data set
my_track <- as_sftrack(raccoon,
  time = "timestamp",
  error = NA, coords = c("longitude", "latitude"),
  group = burstz
)

summary(my_track)

# change active group
active_group(my_track$sft_group) <- "id"

summary(my_track)

sftrack documentation built on Nov. 8, 2020, 4:33 p.m.