Yorgos
Yorgos

Reputation: 30465

gmp (Multiple Precision Arithmetic) apply.bigz function error

Using the example in its help page:

library(gmp)
x <- as.bigz(matrix(1:12,3))
apply(x,1,min)
# Big Integer ('bigz') object of length 3:
# [1] 1 2 3
apply(x,2,max)
# Big Integer ('bigz') object of length 3:
# [1] 10 11 12

The results should be:

x <- matrix(1:12,3)
apply(x,1,min)
# [1] 1 2 3
apply(x,2,max)
# [1]  3  6  9 12

Upvotes: 5

Views: 143

Answers (1)

user11113339
user11113339

Reputation:

Works ok now!!

x <- matrix(1:12,3)
apply(x,1,min)
# [1] 1 2 3
apply(x,2,max)
# [1]  3  6  9 12

Upvotes: 2

Related Questions