+2 votes
in R Language by
What do you understand by element recycling in R?

1 Answer

0 votes
by

If two vectors with different lengths perform an operation –the elements of the shorter vector will be re-used to complete the operation. This is referred to as element recycling.

Example – Vector A <-c(1,2,0,4) and Vector B<-(3,6) then the result of A*B will be ( 3,12,0,24). Here 3 and 6 of vector B are repeated when computing the result.

Related questions

+3 votes
asked Jul 28, 2019 in R Language by Aarav2017
+3 votes
asked Jul 28, 2019 in R Language by Aarav2017
...