Elementwise division of numeric or character arrays.

x %div% y

Arguments

x

numeric or character array.

y

numeric or character array.

Value

array.

References

Guidotti, E. (2020). "calculus: High dimensional numerical and symbolic calculus in R". https://arxiv.org/abs/2101.00086

See also

Other basic arithmetic: %diff%(), %dot%(), %inner%(), %kronecker%(), %outer%(), %prod%(), %sum%()

Examples

### vector x <- c("a+1","b+2") x %div% x
#> [1] "1" "1"
### matrix x <- matrix(letters[1:4], ncol = 2) x %div% x
#> [,1] [,2] #> [1,] "1" "1" #> [2,] "1" "1"
### array x <- array(letters[1:12], dim = c(2,2,3)) y <- array(1:12, dim = c(2,2,3)) x %div% y
#> , , 1 #> #> [,1] [,2] #> [1,] "(a) / 1" "(c) / 3" #> [2,] "(b) / 2" "(d) / 4" #> #> , , 2 #> #> [,1] [,2] #> [1,] "(e) / 5" "(g) / 7" #> [2,] "(f) / 6" "(h) / 8" #> #> , , 3 #> #> [,1] [,2] #> [1,] "(i) / 9" "(k) / 11" #> [2,] "(j) / 10" "(l) / 12" #>