EVOLUTION-MANAGER
Edit File: in_dir.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: Evaluate an expression under a specified working directory</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 in_dir {xfun}"><tr><td>in_dir {xfun}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Evaluate an expression under a specified working directory</h2> <h3>Description</h3> <p>Change the working directory, evaluate the expression, and restore the working directory. </p> <h3>Usage</h3> <pre> in_dir(dir, expr) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>dir</code></td> <td> <p>Path to a directory.</p> </td></tr> <tr valign="top"><td><code>expr</code></td> <td> <p>An R expression.</p> </td></tr> </table> <h3>Examples</h3> <pre> library(xfun) in_dir(tempdir(), { print(getwd()) list.files() }) </pre> <hr /><div style="text-align: center;">[Package <em>xfun</em> version 0.16 <a href="00Index.html">Index</a>]</div> </body></html>