On 29/05/2009, at 8:00 AM, bogaso.christofer wrote:

I have following addition :



1:2 + 1:10

 [1]  2  4  4  6  6  8  8 10 10 12



I could not understand how R adding those two unequal vector? Any help?

Look at the help for ``+'' (?"+") and look at ``Value''.  There you will
see:

These operators return vectors containing the result of the
element by element operations.  The elements of shorter vectors
are recycled as necessary (with a 'warning' when they are recycled
only _fractionally_).  The operators are '+' for addition, '-' for
subtraction, '*' for multiplication, '/' for division and '^' for
exponentiation.

The key word is ``recycled''.

        cheers,

                Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}

______________________________________________
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