EVOLUTION-MANAGER
Edit File: replace.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: Replace Values in a 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 replace {base}"><tr><td>replace {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Replace Values in a Vector</h2> <h3>Description</h3> <p><code>replace</code> replaces the values in <code>x</code> with indices given in <code>list</code> by those given in <code>values</code>. If necessary, the values in <code>values</code> are recycled. </p> <h3>Usage</h3> <pre> replace(x, list, values) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>vector</p> </td></tr> <tr valign="top"><td><code>list</code></td> <td> <p>an index vector</p> </td></tr> <tr valign="top"><td><code>values</code></td> <td> <p>replacement values</p> </td></tr> </table> <h3>Value</h3> <p>A vector with the values replaced. </p> <h3>Note</h3> <p><code>x</code> is unchanged: remember to assign the result. </p> <h3>References</h3> <p>Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) <em>The New S Language</em>. Wadsworth & Brooks/Cole. </p> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>