| 1. |
What Do You Understand By Element Recycling In R? |
|
Answer» 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. 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. |
|