R/create.Fmatrix.R

Defines functions create.Fmatrix

Documented in create.Fmatrix

create.Fmatrix <- function(x, name, as.mxMatrix=TRUE, ...) {
  x <- as.logical(x)
  Fmatrix <- Diag(as.numeric(x))[x, , drop=FALSE]
  if (as.mxMatrix) {
    if (missing(name)) as.mxMatrix(Fmatrix) else as.mxMatrix(Fmatrix, name=name)
  } else {
    Fmatrix
  }
}

Try the metaSEM package in your browser

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

metaSEM documentation built on Oct. 18, 2018, 9:03 a.m.