EVOLUTION-MANAGER
Edit File: with_makevars.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: Makevars variables</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 with_makevars {withr}"><tr><td>with_makevars {withr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Makevars variables</h2> <h3>Description</h3> <p>Temporarily change contents of an existing <code>Makevars</code> file. </p> <h3>Usage</h3> <pre> with_makevars( new, code, path = makevars_user(), assignment = c("=", ":=", "?=", "+=") ) local_makevars( .new = list(), ..., .path = makevars_user(), .assignment = c("=", ":=", "?=", "+="), .local_envir = parent.frame() ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>new, .new</code></td> <td> <p><code style="white-space: pre;">[named character]</code><br /> New variables and their values</p> </td></tr> <tr valign="top"><td><code>code</code></td> <td> <p><code>[any]</code><br /> Code to execute in the temporary environment</p> </td></tr> <tr valign="top"><td><code>path, .path</code></td> <td> <p><code style="white-space: pre;">[character(1)]</code><br /> location of existing <code>Makevars</code> file to modify.</p> </td></tr> <tr valign="top"><td><code>assignment, .assignment</code></td> <td> <p><code style="white-space: pre;">[character(1)]</code><br /> assignment type to use.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Additional new variables and their values.</p> </td></tr> <tr valign="top"><td><code>.local_envir</code></td> <td> <p><code style="white-space: pre;">[environment]</code><br /> The environment to use for scoping.</p> </td></tr> </table> <h3>Details</h3> <p>If no <code>Makevars</code> file exists or the fields in <code>new</code> do not exist in the existing <code>Makevars</code> file then the fields are added to the new file. Existing fields which are not included in <code>new</code> are appended unchanged. Fields which exist in <code>Makevars</code> and in <code>new</code> are modified to use the value in <code>new</code>. </p> <h3>Value</h3> <p><code>[any]</code><br /> The results of the evaluation of the <code>code</code> argument. </p> <h3>See Also</h3> <p><code><a href="withr.html">withr</a></code> for examples </p> <h3>Examples</h3> <pre> writeLines("void foo(int* bar) { *bar = 1; }\n", "foo.c") system("R CMD SHLIB --preclean -c foo.c") with_makevars(c(CFLAGS = "-O3"), system("R CMD SHLIB --preclean -c foo.c")) unlink(c("foo.c", "foo.so")) </pre> <hr /><div style="text-align: center;">[Package <em>withr</em> version 2.5.0 <a href="00Index.html">Index</a>]</div> </body></html>