From 1ed70469b0ec142ac1438ad82e7b79bdea37f5be Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 16 May 2024 12:25:34 +0200 Subject: [PATCH] list diseases in multi epidist print method #302 #277 --- R/epidist_db.R | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/R/epidist_db.R b/R/epidist_db.R index 69c00330e..3f2ea0199 100644 --- a/R/epidist_db.R +++ b/R/epidist_db.R @@ -604,6 +604,12 @@ print.multi_epidist <- function(x, ...) { FUN.VALUE = logical(1) ) ) + ), + sprintf( + "\n Diseases available:\n %s", + paste(sort(unique( + vapply(x, function(y) y$disease, FUN.VALUE = character(1)) + )), collapse = "\n ") ) ) )