R/default_code_agg.R

Defines functions default_code_agg

default_code_agg <- function(index) {
  #If it's a number, sum, otherwise count distinct
  if(is.numeric(index)==TRUE) {
    sum(index)
  } else {
    length(unique(index))
  }
}
PheWAS/PheWAS documentation built on July 3, 2023, 3:40 p.m.