EVOLUTION-MANAGER
Edit File: list.sample.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Sample a list or vector</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for list.sample {rlist}"><tr><td>list.sample {rlist}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Sample a list or vector</h2> <h3>Description</h3> <p>Sample a list or vector </p> <h3>Usage</h3> <pre> list.sample(.data, size, replace = FALSE, weight = 1, prob = NULL) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>.data</code></td> <td> <p>A <code>list</code> or <code>vector</code></p> </td></tr> <tr valign="top"><td><code>size</code></td> <td> <p><code>integer</code>. The size of the sample</p> </td></tr> <tr valign="top"><td><code>replace</code></td> <td> <p><code>logical</code>. Should sampling be with replacement?</p> </td></tr> <tr valign="top"><td><code>weight</code></td> <td> <p>A lambda expression to determine the weight of each list member, which only takes effect if <code>prob</code> is <code>NULL</code>.</p> </td></tr> <tr valign="top"><td><code>prob</code></td> <td> <p>A <code>vector</code> of probability weights for obtaining the elements of the list being sampled.</p> </td></tr> </table> <h3>Examples</h3> <pre> x <- list(a = 1, b = c(1,2,3), c = c(2,3,4)) list.sample(x, 2, weight = sum(.)) </pre> <hr /><div style="text-align: center;">[Package <em>rlist</em> version 0.4.6.2 <a href="00Index.html">Index</a>]</div> </body></html>