| normalize {cytominer} | R Documentation | 
Normalize observation variables.
Description
normalize normalizes observation variables based on the specified normalization method.
Usage
normalize(
  population,
  variables,
  strata,
  sample,
  operation = "standardize",
  ...
)
Arguments
population | 
 tbl with grouping (metadata) and observation variables.  | 
variables | 
 character vector specifying observation variables.  | 
strata | 
 character vector specifying grouping variables for grouping prior to normalization.  | 
sample | 
 tbl containing sample that is used by normalization methods to estimate parameters.   | 
operation | 
 optional character string specifying method for normalization. This must be one of the strings   | 
... | 
 arguments passed to normalization operation  | 
Value
normalized data of the same class as population.
Examples
suppressMessages(suppressWarnings(library(magrittr)))
population <- tibble::tibble(
  Metadata_group = c(
    "control", "control", "control", "control",
    "experiment", "experiment", "experiment", "experiment"
  ),
  Metadata_batch = c("a", "a", "b", "b", "a", "a", "b", "b"),
  AreaShape_Area = c(10, 12, 15, 16, 8, 8, 7, 7)
)
variables <- c("AreaShape_Area")
strata <- c("Metadata_batch")
sample <- population %>% dplyr::filter(Metadata_group == "control")
cytominer::normalize(population, variables, strata, sample, operation = "standardize")
[Package cytominer version 0.2.2 Index]