Element-wise sum with R's recycling (a shorter vector is recycled down the columns of a matrix). Equivalent to R's +.
+
add([[1, 2], [3, 4]], [10, 20]); // [[11, 12], [23, 24]]add([1, 2, 3], 2); // [3, 4, 5] Copy
add([[1, 2], [3, 4]], [10, 20]); // [[11, 12], [23, 24]]add([1, 2, 3], 2); // [3, 4, 5]
Element-wise sum with R's recycling (a shorter vector is recycled down the columns of a matrix). Equivalent to R's
+.