as in excel, an formulae are used to refer to cells, i'd like to know how to replicate that in R : <p>trying to keep it as simple as possible</p>

<p>Consider this simple excel formula. Lets presume that I'm in cell C2 currently and it holds this formula.
=if(A2=1,B2,<strong>C1</strong>)</p>

<p>i'm stuck at the referencing part. is there any way to do it?</p>
