Version: 1.0.0
Date: 2022-07-20
Title: Normalize Hadamard Matrix
Author: Baidya Nath Mandal [aut, cre]
Maintainer: Baidya Nath Mandal <mandal.stat@gmail.com>
Depends: R (≥ 4.2.0)
Suggests: HadamardR
Description: Normalize a given Hadamard matrix. A Hadamard matrix is said to be normalized when its first row and first column entries are all 1, see Hedayat, A. and Wallis, W. D. (1978) "Hadamard matrices and their applications. The Annals of Statistics, 1184-1238." <doi:10.1214/aos/1176344370>.
License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
NeedsCompilation: no
Packaged: 2022-07-20 05:27:10 UTC; b
Repository: CRAN
Date/Publication: 2022-07-21 12:30:02 UTC

How many elements are TRUE in a logical vector

Description

This function finds number of elements which are TRUE in a logical vector

Usage

how.many(x)

Arguments

x

A logical vector

Value

A non-negative integer of length 1.

Author(s)

Baidya Nath Mandal <mandal.stat@gmail.com>

Examples

x <- c(1,-1,1,-1,1,-1)
how.many(x == -1)
how.many(seq(1,7,2) == 3)

Normalized Hadamard Matrix

Description

Checks whether a Hadamard matrix is normalized or not.

Usage

is.normalized(H)

Arguments

H

A Hadamard matrix

Value

Returns TRUE when the Hadamard matrix is normalized, otherwise returns FALSE.

Author(s)

Baidya Nath Mandal <mandal.stat@gmail.com>

Examples

h2 <- matrix(c(1,1,1,-1),nrow = 2)
is.normalized(h2)
h4 <-h2 
is.normalized(h4)
h2 <- matrix(c(1,-1,1,1),nrow = 2)
is.normalized(h2)

Normalized Hadamard Matrix

Description

Converts a given Hadamard matrix to its normalized form

Usage

normalizeH(H)

Arguments

H

A Hadamard matrix

Value

A normalize Hadamard matrix of same dimension as the input matrix.

Author(s)

Baidya Nath Mandal <mandal.stat@gmail.com>

Examples

H = matrix(c(1,1,1,-1),nrow = 2)
normalizeH(H)

	require(HadamardR)
	h8 <- Hadamard_Matrix(8)
	normalizeH(h8)
	

mirror server hosted at Truenetwork, Russian Federation.