R/help.law.R

help.law <- function(law.index) {

    # Retrieve the number of laws in our package:
    tmp <- names(getDLLRegisteredRoutines("PoweR")[[".C"]])
    nb.laws <- length(grep("law", tmp))
  
    if (!(law.index %in% 1:nb.laws)) stop(paste("Law index should be an integer between 1 and ", nb.laws, ".", sep = ""))
  
    if (nchar(law.index) == 1) Rd <- paste("law000", law.index, sep = "")
    if (nchar(law.index) == 2) Rd <- paste("law00", law.index, sep = "")
    if (nchar(law.index) == 3) Rd <- paste("law0", law.index, sep = "")
    
    help(Rd)
    
}

Try the PoweR package in your browser

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

PoweR documentation built on May 2, 2019, 2:09 p.m.