EVOLUTION-MANAGER
Edit File: resample_partition.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: Generate an exclusive partitioning of a data frame</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 resample_partition {modelr}"><tr><td>resample_partition {modelr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Generate an exclusive partitioning of a data frame</h2> <h3>Description</h3> <p>Generate an exclusive partitioning of a data frame </p> <h3>Usage</h3> <pre> resample_partition(data, p) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>data</code></td> <td> <p>A data frame</p> </td></tr> <tr valign="top"><td><code>p</code></td> <td> <p>A named numeric vector giving where the value is the probability that an observation will be assigned to that group.</p> </td></tr> </table> <h3>See Also</h3> <p>Other resampling techniques: <code><a href="bootstrap.html">bootstrap</a>()</code>, <code><a href="resample_bootstrap.html">resample_bootstrap</a>()</code>, <code><a href="resample.html">resample</a>()</code> </p> <h3>Examples</h3> <pre> ex <- resample_partition(mtcars, c(test = 0.3, train = 0.7)) mod <- lm(mpg ~ wt, data = ex$train) rmse(mod, ex$test) rmse(mod, ex$train) </pre> <hr /><div style="text-align: center;">[Package <em>modelr</em> version 0.1.8 <a href="00Index.html">Index</a>]</div> </body></html>