EVOLUTION-MANAGER
Edit File: A1_to_R1C1.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: Convert cell reference strings from A1 to R1C1 format</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 A1_to_R1C1 {cellranger}"><tr><td>A1_to_R1C1 {cellranger}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Convert cell reference strings from A1 to R1C1 format</h2> <h3>Description</h3> <p>Convert cell reference strings from A1 to R1C1 format. Strictly speaking, this only makes sense for absolute references, such as <code>"$B$4"</code>. Why? Because otherwise, we'd have to know the host cell of the reference. Set <code>strict = FALSE</code> to relax and treat pure relative references, like (<code>"B4"</code>), as if they are absolute. Mixed references, like (<code>"B$4"</code>), will always return <code>NA</code>, no matter the value of <code>strict</code>. </p> <h3>Usage</h3> <pre> A1_to_R1C1(x, strict = TRUE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>character vector of cell references in A1 format</p> </td></tr> <tr valign="top"><td><code>strict</code></td> <td> <p>logical, affects reading and writing of A1 formatted cell references. When <code>strict = TRUE</code>, references must be declared absolute through the use of dollar signs, e.g., <code>$A$1</code>, for parsing. When making a string, <code>strict = TRUE</code> requests dollar signs for absolute reference. When <code>strict = FALSE</code>, pure relative reference strings will be interpreted as absolute, i.e. <code>A1</code> and <code>$A$1</code> are treated the same. When making a string, <code>strict = FALSE</code> will cause dollars signs to be omitted in the reference string.</p> </td></tr> </table> <h3>Value</h3> <p>character vector of absolute cell references in R1C1 format </p> <h3>Examples</h3> <pre> A1_to_R1C1("$A$1") A1_to_R1C1("A1") ## raises a warning, returns NA A1_to_R1C1("A1", strict = FALSE) ## unless strict = FALSE A1_to_R1C1(c("A1", "B$4")) ## raises a warning, includes an NA, because A1_to_R1C1(c("A1", "B$4"), strict = FALSE) ## mixed ref always returns NA </pre> <hr /><div style="text-align: center;">[Package <em>cellranger</em> version 1.1.0 <a href="00Index.html">Index</a>]</div> </body></html>