📄 xtrct-methods.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Methods for "[": Extraction or Subsetting in Package 'arules'</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 [-methods {arules}"><tr><td>[-methods {arules}</td><td align="right">R Documentation</td></tr></table>
<h2>Methods for "[": Extraction or Subsetting in Package 'arules'</h2>
<h3>Description</h3>
<p>
Methods for <code>"["</code>, i.e., extraction or subsetting in package
<span class="pkg">arules</span>. Subsetting can be done by integers containing column/row
numbers, vectors of logicals or strings containing parts of item labels.
</p>
<h3>Methods</h3>
<dl>
<dt>[</dt><dd><code>signature(x = "itemMatrix", i = "ANY", j = "ANY", drop= "ANY")</code>; extracts parts of an <code>itemMatrix</code>.
The first argument selects rows (e.g., transactions or rules)
and the second argument selects columns (items).
Either argument can be omitted to select all rows or columns.</dd>
<dt>[</dt><dd><code>signature(x = "itemsets", i = "ANY", j = "ANY", drop= "ANY")</code>; extracts a subset of itemsets and the associated quality measures.
<code>j</code> has to be missing. </dd>
<dt>[</dt><dd><code>signature(x = "rules", i = "ANY", j = "ANY", drop= "ANY")</code>; extracts a subset of rules and the associated quality measures.
<code>j</code> has to be missing. </dd>
<dt>[</dt><dd><code>signature(x = "transactions", i = "ANY", j = "ANY", drop= "ANY")</code>; extracts a subset of transactions/items from a transactions object
(a binary incidence matrix).
<code>i</code> and <code>j</code> can be numeric where
<code>i</code> selects transactions and
<code>j</code> selects items. </dd>
<dt>[</dt><dd><code>signature(x = "tidLists", i = "ANY", j = "ANY", drop= "ANY")</code>; extracts parts (transaction ID vectors) from <code>tidLists</code>.
<code>i</code> selects the items or itemsets
and <code>j</code> selects transactions in the lists.</dd>
</dl>
<h3>See Also</h3>
<p>
<code><a href="itemMatrix-class.html">itemMatrix-class</a></code>,
<code><a href="itemsets-class.html">itemsets-class</a></code>,
<code><a href="rules-class.html">rules-class</a></code>,
<code><a href="transactions-class.html">transactions-class</a></code>,
<code><a href="tidLists-class.html">tidLists-class</a></code>
</p>
<h3>Examples</h3>
<pre>
data(Adult)
Adult
## select first 10 transactions
Adult[1:10]
## select first 10 items for first 100 transactions
Adult[1:100, 1:10]
## select the first 100 transactions for the items containing
## "income" or "age=Young" in their labels
Adult[1:100, c("income=small", "income=large" ,"age=Young")]
</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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -