sort.html
来自「本程序是基于linux系统下c++代码」· HTML 代码 · 共 85 行
HTML
85 行
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Sorting Associations</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../../R.css">
</head><body>
<table width="100%" summary="page for sort {arules}"><tr><td>sort {arules}</td><td align="right">R Documentation</td></tr></table>
<h2>Sorting Associations</h2>
<h3>Description</h3>
<p>
Provides the generic function <code>SORT</code> and the S4 method to sort elements
in class <code><a href="associations-class.html">associations</a></code> (e.g., itemsets or rules)
according to the value of measures stored in the association's slot
<code>quality</code> (e.g., support).
</p>
<h3>Usage</h3>
<pre>
## S4 method for signature 'associations':
sort(x, decreasing = TRUE, na.last = NA,
by = "support")
## deprecated since arules version 0.5-1
## S4 method for signature 'associations':
SORT(x, by = "support", na.last = NA,
decreasing = TRUE)
</pre>
<h3>Arguments</h3>
<table summary="R argblock">
<tr valign="top"><td><code>x</code></td>
<td>
an object to be sorted.</td></tr>
<tr valign="top"><td><code>decreasing</code></td>
<td>
a logical. Should the sort be increasing or
decreasing? (default is decreasing)</td></tr>
<tr valign="top"><td><code>na.last</code></td>
<td>
for controlling the treatment of <code>NAs</code>. If <code>TRUE</code>,
missing values in the data are put last; if <code>FALSE</code>, they are put
first; if <code>NA</code>, they are removed.</td></tr>
<tr valign="top"><td><code>by</code></td>
<td>
a character string specifying the quality measure stored in
<code>x</code> to be used to sort <code>x</code>.</td></tr>
</table>
<h3>Value</h3>
<p>
An object of the same class as <code>x</code>.</p>
<h3>See Also</h3>
<p>
<code><a href="associations-class.html">associations-class</a></code>
</p>
<h3>Examples</h3>
<pre>
data("Adult")
## Mine frequent itemsets with Eclat.
fsets <- eclat(Adult, parameter = list(supp = 0.5))
## Print the 5 itemsets with the highest support as a data.frame.
as(sort(fsets)[1:5], "data.frame")
</pre>
<hr><div align="center">[Package <em>arules</em> version 0.6-6 <a href="00Index.html">Index]</a></div>
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?