force.integer | R Documentation |
Returns an elementwise as.integer
-ed array. All magic squares
should have integer elements.
force.integer(x)
x |
Array to be converted |
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.
Robin K. S. Hankin
a <- matrix(rep(1,4),2,2) force.integer(a) as.integer(a)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.