Linn wrote:
> Hi
> Could anyone please explain to me the difference between the = and the ==?
> I'm quite new to R and I've tried to find out but didn't get any wiser...

"=" is the assignment operator as in

 > x = 3
 > x
[1] 3

(but use the "<-" operator instead, see a post by Bill Venables a few 
days ago called ``What to use for assignment, " = " or " <- "?'')

whereas "==" is the binary operator for testing equality, as in

 > x == 3
[1] TRUE

Have a look at any introductory R book or at the R intro at 
http://cran.r-project.org/doc/manuals/R-intro.html

-- 
Gad Abraham
Dept. CSSE and NICTA
The University of Melbourne
Parkville 3010, Victoria, Australia
email: [EMAIL PROTECTED]
web: http://www.csse.unimelb.edu.au/~gabraham

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to