R/ps.makestrata.R

Defines functions ps.makestrata

Documented in ps.makestrata

## #########################################################
## Function to stratifiy data dependent of the class of data
## #########################################################

ps.makestrata <- function(object,
                          breaks             = NULL, 
                          name.stratum.index = "stratum.index",  
                          stratified.by      = NULL,
                          ...
                          )
{
  if (missing(object))
    stop("Argument 'object' is not given.")
  
  if (any(class(object)=="pscore") |
      any(class(object)=="data.frame"))
    
    UseMethod("ps.makestrata")
  else
    stop("Class of argument 'object' will not supported.")
  
}

Try the nonrandom package in your browser

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

nonrandom documentation built on May 29, 2017, 11:41 p.m.