timepoint_norm_group: Normalize an individual tidycyte metric data frame by time

Description Usage Arguments Value Examples

View source: R/timepoint_norm_group.R

Description

Normalizes an individual tidycyte data frame based on a specified timem value. This function is used by normalize_by_time() to normalize pre-grouped data, and is not anticipated to be used by users.

Usage

1

Arguments

df

A data frame of an individual tidycyte dataset. At a minimum should contain column names "value" and "elapsed".

t0

A numeric value specifying an individual elapsed time.

Value

A dataframe with the value column normalized by the value where elapsed equals t0.

Examples

1
2
3
4
5
6
df %>%
  group_by(across(-c(date_time,elapsed,id,value))) %>%
  nest() %>%
  mutate(data = map(data, timepoint_norm_group, t0[[metric]])) %>%
  unnest(cols = c(data)) %>%
  ungroup()

hodgeslab/tidycyte documentation built on Dec. 20, 2021, 4:47 p.m.