DoubleCenter {invertiforms}R Documentation

Construct and use DoubleCenter transformations

Description

A convenience function to create DoubleCenter S4 objects, which are useful for simultaneously row and column centering a matrix.

Usage

DoubleCenter(A)

## S4 method for signature 'DoubleCenter,sparseMatrix'
transform(iform, A)

## S4 method for signature 'DoubleCenter,sparseLRMatrix'
inverse_transform(iform, A)

## S4 method for signature 'DoubleCenter,vsp_fa'
inverse_transform(iform, A)

Arguments

A

A matrix to transform.

iform

An Invertiform object describing the transformation.

Value

Examples


library(igraph)
library(igraphdata)

data("karate", package = "igraphdata")

A <- get.adjacency(karate)

iform <- DoubleCenter(A)

A_tilde <- transform(iform, A)
A_recovered <- inverse_transform(iform, A_tilde)

all.equal(A, A_recovered)


[Package invertiforms version 0.1.1 Index]