force.integer: Integerize array elements

Description Usage Arguments Note Author(s) Examples

Description

Returns an elementwise as.integer-ed array. All magic squares should have integer elements.

Usage

1

Arguments

x

Array to be converted

Note

Function force.integer() differs from as.integer() as the latter returns an integer vector, and the former returns an array whose elements are integer versions of x; see examples section below.

Author(s)

Robin K. S. Hankin

Examples

1
2
3
a <- matrix(rep(1,4),2,2)
force.integer(a)
as.integer(a)

magic documentation built on May 2, 2019, 12:21 p.m.