| map_ids | R Documentation |
Map raw tracking IDs to standardized child IDs
map_ids(
data,
mapping,
exclude_ids = NULL,
raw_id_col = "ID",
id_col = "id_code",
analyze_col = "Analyze"
)
data |
A data frame with raw tracking data |
mapping |
Either:
|
exclude_ids |
Vector of raw IDs to exclude from analysis (sets Analyze = 0) |
raw_id_col |
Name of the raw ID column in data (default: "ID") |
id_col |
Name of the output column for standardized IDs (default: "id_code") |
analyze_col |
Name of the Analyze column in data (default: "Analyze") |
Data frame with added id_code column and updated Analyze column
raw_data <- data.frame(
ID = c(1L, 2L, 3L),
At = as.POSIXct("2025-03-18 11:45:00"),
X = c(1.0, 2.0, 3.0),
Y = c(1.0, 2.0, 3.0)
)
id_map <- data.frame(raw_id = c(1L, 2L, 3L), child_id = c(5001L, 5002L, 5003L))
data_mapped <- map_ids(raw_data, id_map)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.