rmsd: Root Mean Squared Deviation of (A - B)

View source: R/rmsd.R

rmsdR Documentation

Root Mean Squared Deviation of (A - B)

Description

Calculates the root mean squared deviation of matrices A and B. If these matrices are symmetric (Symmetric = TRUE) then the calculation is based on the upper triangles of each matrix. When the matrices are symmetric, the diagonal of each matrix can be included or excluded from the calculation (IncludeDiag = FALSE)

Usage

rmsd(A, B, Symmetric = TRUE, IncludeDiag = FALSE)

Arguments

A

A possibly non square matrix.

B

A matrix of the same dimensions as matrix A.

Symmetric

Logical indicating whether A and B are symmetric matrices. (Default: Symmetric = TRUE)

IncludeDiag

Logical indicating whether to include the diagonals in the calculation. (Default: IncludeDiag = FALSE).

Value

Returns the root mean squared deviation of (A - B).

Author(s)

Niels Waller

Examples


A <- matrix(rnorm(9), nrow = 3)
B <- matrix(rnorm(9), nrow = 3)

( rmsd(A, B, Symmetric = FALSE, IncludeDiag = TRUE) )

fungible documentation built on May 29, 2024, 8:28 a.m.