On Jun 16, 2010, at 6:33 PM, li li wrote:
Hi all,
I have two questions. Can some one give some help?
The first question is regarding the pair of operators "&" and
"&&". What
is the
difference between the two?
& operates on vectors, returns a vector
&& operates on the first item in each argument. Retruns a value and a
warning if either of the arguments of of length > 1.
The second question is regarding "<-" and "=". Usually we use
"<-" as the assignment operator. I saw some people use "=". Is there
any difference between the two.
Yes. Many discussions in the archives. will be more erudite and
accurate than mine. "=" is preferred for assigning values in argument
lists. "<-" is preferred for assignment to objects. Generally the
differences do not matter but there are exceptions.
--
David.
______________________________________________
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.