swh:1:snp:ffdd0a7d2c8ea15ad41d45b3b178f668bd942287
Raw File
Tip revision: 65dce028095b06ee5ed19673e3045548876c41d3 authored by Derek Young on 30 December 2007, 00:00:00 UTC
version 0.3.3
Tip revision: 65dce02
zzz.r
######################################################################
#
# zzz.r
#
# Licensed under the GNU General Public License version 2 (June, 1991)
#
# Part of the R/mixtools package
#
# .First.lib is run when the package is loaded with library(mixtools)
#
######################################################################

.First.lib <- function(lib, pkg){
    library.dynam("mixtools", pkg, lib)
    DESCpath <- file.path(system.file(package="mixtools"), "DESCRIPTION")
    info <- read.dcf(DESCpath)
#   info <- read.dcf(file.path(lib, pkg, "DESCRIPTION")) does the same thing but
#   the other way works even outside the .First.lib function
    cat(pkg,'package version', info[,"Version"], '  Released', info[,"Date"], '\n')
    cat('Type help(package="mixtools") to get started.\n')
}

.Last.lib <- function(libpath){
  library.dynam.unload("mixtools",libpath)
}

back to top