EVOLUTION-MANAGER
Edit File: is.unsorted.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Test if an Object is Not Sorted</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for is.unsorted {base}"><tr><td>is.unsorted {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Test if an Object is Not Sorted</h2> <h3>Description</h3> <p>Test if an object is not sorted (in increasing order), without the cost of sorting it. </p> <h3>Usage</h3> <pre> is.unsorted(x, na.rm = FALSE, strictly = FALSE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> object with a class or a numeric, complex, character, logical or raw vector.</p> </td></tr> <tr valign="top"><td><code>na.rm</code></td> <td> <p>logical. Should missing values be removed before checking?</p> </td></tr> <tr valign="top"><td><code>strictly</code></td> <td> <p>logical indicating if the check should be for <em>strictly</em> increasing values.</p> </td></tr> </table> <h3>Value</h3> <p>A length-one logical value. All objects of length 0 or 1 are sorted. Otherwise, the result will be <code>NA</code> except for atomic vectors and objects with an S3 class (where the <code>>=</code> or <code>></code> method is used to compare <code>x[i]</code> with <code>x[i-1]</code> for <code>i</code> in <code>2:length(x)</code>) or with an S4 class where you have to provide a method for <code><a href="is.unsorted.html">is.unsorted</a>()</code>. </p> <h3>Note</h3> <p>This function is designed for objects with one-dimensional indices, as described above. Data frames, matrices and other arrays may give surprising results. </p> <h3>See Also</h3> <p><code><a href="sort.html">sort</a></code>, <code><a href="order.html">order</a></code>.</p> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>