I have the following code snippet:
if(k<=100 && k>=0 )
{
j[k+seq(-50,150)]<-F;
}
else
{
j[k+seq(-100,100)]<-F;
}
And the following error:
Error in j[k + seq(-50, 150)] <- F : only 0's may be mixed with negative subscripts
Why am I getting this even though I have set the conditions if the subscripts may run into the negative values?