normalize_observations {sherlock}R Documentation

Normalize observations

Description

This function takes an input dataset and normalizes observations

Usage

normalize_observations(data, y_var, grouping_var, ref_values)

Arguments

data

input dataset to be plotted (required)

y_var

response variable, Y (required)

grouping_var

select grouping variable to normalize by (required)

ref_values

add reference (nominal) values. takes a string of values with values appearing in the same order as in grouping variable. string length must be equal to unique values in grouping variable (required)

Value

A tibble object with observations normalized and saved in a new column.

Examples

library(dplyr)

polar_small_multiples_data %>%
    filter(ID_Measurement_Angle %in% c(0, 45, 90, 135)) %>%
    normalize_observations(y_var = ID,
                           grouping_var = Tip_Bottom,
                           ref_values = c(0.2075, 0.2225))


[Package sherlock version 0.7.0 Index]