Hi, there
I am a grad student struggling to get my syntax right in a model I am
building in R.
I am trying to specify a variable,W, in a loop, such that on the first
iteration, it is equal to Wo, my starting value, which I have already
specified with
Wo-9.2
On any other iteration other
Hi, there
I am a grad student struggling to get my syntax right in a model I am
building in R.
I am trying to specify a variable,W, in a loop, such that on the first
iteration, it is equal to Wo, my starting value, which I have already
specified with
Wo-9.2
On any other iteration other
On Mon, Jun 30, 2003 at 11:21:52AM -0400, Michael Rennie wrote:
W- function(w)
{
if (comp[i,1]=1) W[i]-Wo else
== is comparison operator, but = is assignment one.
This code also doesn't work:
x - 0
if (x = 1)
Error: syntax error
But this works:
if (x == 1)
+
Chack also help(==), help(=)
This is untested, so try it first, but my approach would be:
W- function(w)
{
W[i]-ifelse(comp[i,1]==1, Wo, (work[i-1,5]work[i-1,13]*/Ef))
}
Best,
Andy Perrin
--
Andrew J Perrin - http://www.unc.edu/~aperrin
Assistant Professor
On 30 Jun 2003 at 11:24, Michael Rennie wrote:
Hola!
Hi, there
I am a grad student struggling to get my syntax right in a model I am
building in R.
I am trying to specify a variable,W, in a loop, such that on the first
iteration, it is equal to Wo, my starting value, which I have