R/transpose.R

Defines functions transpose

Documented in transpose

transpose <- function(object=NULL){
    if (is.null(object))
      stop('transpose: input is not a matrix or a vector.',
           call.=FALSE)
    if (!is.matrix(object)){
      if (is.atomic(object)){
        mat <- matrix(object,ncol=length(object),byrow=TRUE)
      } else {
        stop('transpose: input is not a matrix or a vector.',
             call.=FALSE)
      }
    } else {
      mat <- object
    }
    return(t(mat))
  }

Try the EFA.MRFA package in your browser

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

EFA.MRFA documentation built on June 16, 2021, 9:12 a.m.