apply {gmp}R Documentation

apply over a matrix

Description

Theses functions overload apply function for big rationals and big integers

Usage

apply(X, MARGIN, FUN)

Arguments

X A matrix of class bigz or bigq
MARGIN 1: apply function on rows; 2: apply function of columns
FUN function to be applied

Value

return a vector of class bigz or bigq.

Author(s)

Antoine Lucas

See Also

apply

Examples

  x = as.bigz(matrix(1:12,3))
  apply(x,1,min)
  apply(x,2,max)
  
  x = as.bigq(matrix(1:12,3))
  apply(x,1,min)
  apply(x,2,max)
  

[Package gmp version 0.4-8 Index]