Skip to content

== operand

4 messages · Renny Li, Gustavo Carvalho, Hadley Wickham +1 more

#
Hello,

You assigned 53 to c, not cc. Also, take a look at this:

http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f
On Tue, Dec 9, 2008 at 9:36 PM, Renny Li <rennyli at yahoo.com> wrote:
#
On Tue, Dec 9, 2008 at 5:36 PM, Renny Li <rennyli at yahoo.com> wrote:
cc is 50.  bb is 1.  Why do you expect 50 to equal 1 + 52?  Perhaps
you meant to type cc <- 53 ?

Hadley
#
Renny Li wrote:
Why?  You are modifying the variables C and c, but not cc.
Perhaps you are confused about the == operator, which
doesn't do assignments -- it only tests equality.
Renny Li wrote:
Because cc is 50, which isn't equal to 53?
Renny Li wrote:
Which makes sense because c is 53 and d is 1+52 (i.e., 53)
Renny Li wrote:
It's different, because cc and c are different
Renny Li wrote:
For this one, you need to see FAQ 7.31 ...