diff --git a/R/add_onset.R b/R/add_onset.R index b23c89e..5abf208 100644 --- a/R/add_onset.R +++ b/R/add_onset.R @@ -37,7 +37,7 @@ #' \item{"Onset_latest": }{The latest age of onset.} #' } #' @export -#' @importFrom data.table merge.data.table +#' @importFrom data.table merge.data.table= #' @examples #' phenos <- example_phenos() #' phenos2 <- add_onset(phenos = phenos) @@ -49,7 +49,7 @@ add_onset <- function(phenos, verbose = TRUE){ # devoptera::args2vars(add_onset) - Onset_latest <- Onset_score <- NULL; + Onset_latest <- Onset_score <- Onset_name <- NULL; if(!any(c("Onset","Onset_name","Onset_names","Onset_score") %in% names(phenos))){ diff --git a/R/hpo_onsets_agg.R b/R/hpo_onsets_agg.R index a575635..333bf9b 100644 --- a/R/hpo_onsets_agg.R +++ b/R/hpo_onsets_agg.R @@ -3,7 +3,7 @@ hpo_onsets_agg <- function(hpo_onsets, agg_by=c("DatabaseID","HPO_ID")){ HPO_ID <- Onset <- Onset_name <- Onset_score <- . <- NULL; - + dict <- hpo_dict(type = "Onset") if("HPO_ID" %in% names(phenos)){ hpo_onsets <- hpo_onsets[HPO_ID %in% unique(phenos$HPO_ID)] }