This function takes a list of matrices, applies each matrix via matrix multiplication to an existing data frame, and combines the resulting projections with the original data frame.

apply_simlr_matrices(
  existing_df,
  matrices_list,
  n_limit = NULL,
  robust = FALSE,
  center = FALSE,
  scale = FALSE,
  absolute_value = NULL,
  verbose = FALSE
)

Arguments

existing_df

An existing data frame to which the matrices will be applied.

matrices_list

A list of matrices read from CSV files.

n_limit

NULL or integer that can limit the number of projections

robust

boolean

center

boolean center the data before applying

scale

boolean scale the data before applying

absolute_value

boolean vector indicating whether to take abs of feature matrices ; set to FALSE by default; when using antspymm_simlr, the values should be set to TRUE; this is not required but it makes sure that the feature weights are non-negative.

verbose

boolean

Value

A list including (entry one) data frame with the original data frame combined with the projections (entry two) the new column names

Examples

matrices_list <- list(
  matrix1 = matrix(rnorm(147 * 171), nrow = 147, ncol = 171),
  matrix2 = matrix(rnorm(147 * 156), nrow = 147, ncol = 156)
)
existing_df <- data.frame(matrix(rnorm(147 * 5), nrow = 147, ncol = 5))
# combined_df <- apply_simlr_matrices(existing_df, matrices_list)