Re: [R] problem with simple if() statement

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Mon 06 Feb 2006 - 20:57:11 EST

Norman Goodacre wrote:

> the following code apprantely, for some grand old reason, induces a syntax error:
>
> if (seq[i] = "A") m <- trans[1,]
>
> where seq is a vector and trans is a matrix. I cannot for the life of me see why this is wrong. Syntax error is:
>
> Error: syntax error in "if (seq[i] ="

I guess you mean "==" ....

Uwe Ligges

>
> Sincerely,
>
> Norman Goodacre
>
>
>
> ---------------------------------
>
> ---------------------------------
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Feb 06 21:23:03 2006

This archive was generated by hypermail 2.1.8 : Tue 07 Feb 2006 - 00:54:31 EST