Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

minmax

are all elements of a vector identical?


Description

Returns TRUE if and only if all elements of a vector are identical.

Usage

minmax(x, tol=1e-6)

Arguments

x

Vector to be tested

tol

Relative tolerance allowed

Details

If x is an integer, exact equality is required. If real or complex, a relative tolerance of tol is required. Note that functions such as is.magic() and is.semimagichypercube() use the default value for tol. To change this, define a new Boolean function that tests the sum to the required tolerance, and set boolean to TRUE

Author(s)

Robin K. S. Hankin

See Also

is.magic()

Examples

data(Ollerenshaw)
minmax(subsums(Ollerenshaw,2))  #should be TRUE, as per is.2x2.correct()

magic

Create and Investigate Magic Squares

v1.5-9
GPL-2
Authors
Robin K. S. Hankin
Initial release
2018-09-14

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.