R/start_message.R

Defines functions .onAttach version

#' @importFrom utils packageDescription
#' 
.onAttach <- function(libname, pkgname){
  
  
  desc <- packageDescription("pwrRasch")
  d1 <- desc$Version
  nk <- paste0(rep(" ", 20 - nchar(d1)))
  
  packageStartupMessage("|----------------------------------------------------------|\n",
                          paste0("| ", desc$Package, " ", d1," (",desc$Date,")"), nk, "               |\n" , 
                        "| Statistical Power Simulation for Testing the Rasch Model |\n" ,
                        "|----------------------------------------------------------|" )

}

version <- function(pkg = "pwrRasch") {
  
  lib <- dirname(system.file(package = pkg))
  desc <- packageDescription(pkg)
  
  return(paste(desc$Package, desc$Version, desc$Date,lib))

}

Try the pwrRasch package in your browser

Any scripts or data that you put into this service are public.

pwrRasch documentation built on May 1, 2019, 10:37 p.m.