R/rsextrmat.R

"rsextrmat" <-
function(RSobj, mat.no = 1)
{
    obj.name <- deparse(substitute(RSobj))
    if (!("RSmpl" %in% class(RSobj) || "RSmplext" %in% class(RSobj))){
         err.text<-paste(obj.name," is not a sample object - see help(\"rsextrobj\")",sep ="",collapse="")
         stop(err.text)
    }

    # if (!(class(RSobj)=="RSmpl" || class(RSobj)=="RSmplext")){
    #      err.text<-paste(obj.name," is not a sample object - see help(\"rsextrobj\")",sep ="",collapse="")
    #      stop(err.text)
    # }
    if(mat.no > RSobj$n_tot)
         stop("\n\tElement ",mat.no," not available (",obj.name," has ", RSobj$n_tot, " elements).")
    obj<-rsextrobj(RSobj, start = mat.no, end = mat.no)
    RET<-rstats(obj, function(x) matrix(x, nrow = obj$n))[[1]]
    RET
}

Try the RaschSampler package in your browser

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

RaschSampler documentation built on Sept. 27, 2023, 5:08 p.m.