diff --git a/DESCRIPTION b/DESCRIPTION index c2583ed..4ed8be8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: yulab.utils Title: Supporting Functions for Packages Maintained by 'YuLab-SMU' -Version: 0.1.7 +Version: 0.1.7.001 Authors@R: c(person("Guangchuang", "Yu", email = "guangchuangyu@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-6485-8781"))) Description: Miscellaneous functions commonly used by 'YuLab-SMU'. Imports: diff --git a/NEWS.md b/NEWS.md index 531628e..3106c82 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# yulab.utils 0.1.7.001 + ++ bug fixed in `pkg_ref()` (2024-08-26, Mon) + # yulab.utils 0.1.7 + `has_internet()` for testing internet connection (2024-08-26, Mon) diff --git a/R/yulab-msg.R b/R/yulab-msg.R index 2df2e1c..928f6e1 100644 --- a/R/yulab-msg.R +++ b/R/yulab-msg.R @@ -93,7 +93,7 @@ pkg_ref <- function(pkgname) { ref <- refs[pkgname] - if (is.null(ref)) return(NULL) + if (is.null(ref) || is.na(ref)) return(NULL) msg <- "Please cite:\n\n" str_wrap(paste0(msg, refs, "\n"))