R/parse_frequency.R

Defines functions parse_frequency

parse_frequency <- function(f,
                            type = NULL){
    if(grepl("HP:",f)) {
      get_freq_dict(type = type)[f]
    } else if(grepl("/",f)) {
      eval(parse(text = f))
    } else if(grepl("%",f)){
      as.numeric(gsub("%","",f))
    } else {NA}
}
neurogenomics/HPOExplorer documentation built on Aug. 24, 2024, 1:39 a.m.