length.html

来自「本程序是基于linux系统下c++代码」· HTML 代码 · 共 79 行

HTML
79
字号
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Getting the Number of Elements</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 length {arules}"><tr><td>length {arules}</td><td align="right">R Documentation</td></tr></table>
<h2>Getting the Number of Elements</h2>


<h3>Description</h3>

<p>
S4 methods for <code>length</code> which return the number of elements of
objects defined in the package <span class="pkg">arules</span>.
</p>


<h3>Usage</h3>

<pre>

## S4 method for signature 'rules':
length(x)

## S4 method for signature 'itemsets':
length(x)

## S4 method for signature 'tidLists':
length(x)

## S4 method for signature 'itemMatrix':
length(x)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>x</code></td>
<td>
an object of class 
<code><a href="transactions-class.html">transactions</a></code>,
<code><a href="rules-class.html">rules</a></code>,
<code><a href="itemsets-class.html">itemsets</a></code>,
<code><a href="tidLists-class.html">tidLists</a></code>, or
<code><a href="itemMatrix-class.html">itemMatrix</a></code>.
</td></tr>
</table>

<h3>Details</h3>

<p>
For <code><a href="itemMatrix-class.html">itemMatrix</a></code> and <code><a href="transactions-class.html">transactions</a></code> the
length is defined as the number of rows (transactions) in the binary
incidence matrix.
</p>
<p>
For sets of associations (<code><a href="rules-class.html">rules</a></code>,
<code><a href="itemsets-class.html">itemsets</a></code> and <code><a href="associations-class.html">associations</a></code> in
general) the length is defined as the number of elements in the set (i.e.,
the number of rules or itemsets).
</p>
<p>
For <code><a href="tidLists-class.html">tidLists</a></code> the length is the number of lists (one per
item or itemset) in the object.
</p>


<h3>Value</h3>

<p>
An integer scalar giving the &ldquo;length&rdquo; of <code>x</code>.</p>


<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 + -
显示快捷键?