⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sample.html

📁 本程序是基于linux系统下c++代码
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Random Samples and Permutations</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 sample {arules}"><tr><td>sample {arules}</td><td align="right">R Documentation</td></tr></table>
<h2>Random Samples and Permutations</h2>


<h3>Description</h3>

<p>
Provides the generic function <code>sample</code> and the S4 method to take a
sample of the specified size from the elements of <code>x</code> using either with
or without replacement.  <code>sample</code> can be used to sample from a set of
transactions or associations.
</p>


<h3>Usage</h3>

<pre>
sample(x, size, replace = FALSE, prob = NULL)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>x</code></td>
<td>
object to be sampled from 
(a set of <code>associations</code> or <code>transactions</code>).</td></tr>
<tr valign="top"><td><code>size</code></td>
<td>
sample size.</td></tr>
<tr valign="top"><td><code>replace</code></td>
<td>
a logical. Sample with replacement? </td></tr>
<tr valign="top"><td><code>prob</code></td>
<td>
a numeric vector of probability weights. </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>,
<code><a href="transactions-class.html">transactions-class</a></code>,
<code><a href="itemMatrix-class.html">itemMatrix-class</a></code>.
</p>


<h3>Examples</h3>

<pre>
data("Adult")

## sample with replacement
s &lt;- sample(Adult, 500, replace = TRUE)
s
</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 + -