Browse code

.onLoad

guangchuang yu authored on 09/11/2016 04:43:48
Showing1 changed files

  • R/zzz.R index 7782e471..d8222c3b 100644
... ...
@@ -1,11 +1,12 @@
1
-.onAttach <- function(libname, pkgname) {
1
+.onLoad <- function(libname, pkgname) {
2 2
     pkgVersion <- packageDescription(pkgname, fields="Version")
3 3
     msg <- paste0(pkgname, " v", pkgVersion, "  ",
4 4
                   "For help: https://guangchuangyu.github.io/", pkgname, "\n\n")
5 5
 
6
-    citation <- paste0("If you use ", pkgnameg, " in published research, please cite:\n",
6
+    citation <- paste0("If you use ", pkgname, " in published research, please cite:\n",
7 7
                   "Guangchuang Yu, David Smith, Huachen Zhu, Yi Guan, Tommy Tsan-Yuk Lam. ",
8 8
                   "ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data. ",
9 9
                   "Methods in Ecology and Evolution 2016, doi:10.1111/2041-210X.12628")
10
+
10 11
     packageStartupMessage(paste0(msg, citation))
11 12
 }