R/get_generals.R

Defines functions get_generals

Documented in get_generals

#' @title Get general parameters
#' 
#' @details
#' Internal function. \code{get_generals} is called by \code{plspm}.
#' This function gets the number and names of: observations,
#' manifest variables, and latent variables
#'
#' @param MV matrix of manifest variables
#' @param path_matrix matrix with path connections
#' @return list with number and names of observations, MVs and LVs
#' @keywords internal
#' @template internals
#' @export
get_generals <- function(MV, path_matrix)
{
  list(obs = nrow(MV),
       obs_names = rownames(MV),
       mvs = ncol(MV),
       mvs_names = colnames(MV),
       lvs = nrow(path_matrix),
       lvs_names = rownames(path_matrix))
}

Try the plspm package in your browser

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

plspm documentation built on March 31, 2023, 11:54 p.m.