size.html
来自「本程序是基于linux系统下c++代码」· HTML 代码 · 共 68 行
HTML
68 行
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Getting the Size of Each Element</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 size {arules}"><tr><td>size {arules}</td><td align="right">R Documentation</td></tr></table>
<h2>Getting the Size of Each Element</h2>
<h3>Description</h3>
<p>
Provides the generic function <code>size</code> and S4 methods to get the size of
each element from objects based on <code><a href="itemMatrix-class.html">itemMatrix</a></code>. For
example, it is used to get a vector of transaction sizes (i.e., the number of
present items (ones) per element (row) of the binary incidence matrix) from
an object of class <code><a href="transactions-class.html">transactions</a></code>).
</p>
<h3>Usage</h3>
<pre>
size(x, ...)
</pre>
<h3>Arguments</h3>
<table summary="R argblock">
<tr valign="top"><td><code>x</code></td>
<td>
an object.</td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
further (unused) arguments.</td></tr>
</table>
<h3>Value</h3>
<p>
<code>size</code> returns a numeric vector of length <code>length(x)</code>. Each
element is the size of the corresponding element (row in the matrix) in
object <code>x</code>. For rules, <code>size</code> returns the sum of the number of
elements in the LHS and the RHS.</p>
<h3>See Also</h3>
<p>
<code><a href="itemMatrix-class.html">itemMatrix-class</a></code>,
<code><a href="transactions-class.html">transactions-class</a></code>
</p>
<h3>Examples</h3>
<pre>
data("Adult")
summary(size(Adult))
</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 + -
显示快捷键?