Running examples in ‘bit64-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: bit64-package
> ### Title: A S3 class for vectors of 64bit integers
> ### Aliases: bit64-package bit64 integer64 is.integer64
> ###   is.integer.integer64 is.vector.integer64 length<-.integer64
> ###   print.integer64 str.integer64
> ### Keywords: package classes manip
> 
> ### ** Examples
> 
> message("Using integer64 in vector")
Using integer64 in vector
> x <- integer64(8)    # create 64 bit vector
> x
integer64
[1] 0 0 0 0 0 0 0 0
> is.atomic(x)         # TRUE
[1] TRUE
> is.integer64(x)      # TRUE
[1] TRUE
> is.numeric(x)        # TRUE
[1] TRUE
> is.integer(x)        # FALSE - debatable
[1] FALSE
> is.double(x)         # FALSE - might change
[1] FALSE
> x[] <- 1:2           # assigned value is recycled as usual
> x[1:6]               # subscripting as usual
integer64
[1] 1 2 1 2 1 2
> length(x) <- 13      # changing length as usual
> x
integer64
 [1] 1 2 1 2 1 2 1 2 0 0 0 0 0
> rep(x, 2)            # replicate as usual
integer64
 [1] 1 2 1 2 1 2 1 2 0 0 0 0 0 1 2 1 2 1 2 1 2 0 0 0 0 0
> seq(as.integer64(1), 10)     # seq.integer64 is dispatched on first given argument
integer64
 [1] 1  2  3  4  5  6  7  8  9  10
> seq(to=as.integer64(10), 1)  # seq.integer64 is dispatched on first given argument
integer64
 [1] 1  2  3  4  5  6  7  8  9  10
> seq.integer64(along.with=x)  # or call seq.integer64 directly
integer64
 [1] 1  2  3  4  5  6  7  8  9  10 11 12 13
> # c.integer64 is dispatched only if *first* argument is integer64 ...
> x <- c(x,runif(length(x), max=100)) 
> # ... and coerces everything to integer64 - including double
> x                                   
integer64
 [1] 1  2  1  2  1  2  1  2  0  0  0  0  0  26 37 57 90 20 89 94 66 62 6  20 17
[26] 68
> names(x) <- letters  # use names as usual
> x
integer64
 a  b  c  d  e  f  g  h  i  j  k  l  m  n  o  p  q  r  s  t  u  v  w  x  y  z 
 1  2  1  2  1  2  1  2  0  0  0  0  0 26 37 57 90 20 89 94 66 62  6 20 17 68 
> 
> message("Using integer64 in array - note that 'matrix' currently does not work")
Using integer64 in array - note that 'matrix' currently does not work
> message("as.vector.integer64 removed as requested by the CRAN maintainer")
as.vector.integer64 removed as requested by the CRAN maintainer
> message("as consequence 'array' also does not work anymore")
as consequence 'array' also does not work anymore
> message("we still can create a matrix or array by assigning 'dim'")
we still can create a matrix or array by assigning 'dim'
> y <- rep(as.integer64(NA), 12)
> dim(y) <- c(3,4)
> dimnames(y) <- list(letters[1:3], LETTERS[1:4])
> y["a",] <- 1:2       # assigning as usual
> y
integer64
  A    B    C    D   
a 1    2    1    2   
b <NA> <NA> <NA> <NA>
c <NA> <NA> <NA> <NA>
> y[1:2,-4]            # subscripting as usual
integer64
  A    B    C   
a 1    2    1   
b <NA> <NA> <NA>
> # cbind.integer64 dispatched on any argument and coerces everything to integer64
> cbind(E=1:3, F=runif(3, 0, 100), G=c("-1","0","1"), y)
integer64
  E F  G  A    B    C    D   
a 1 38 -1 1    2    1    2   
b 2 76 0  <NA> <NA> <NA> <NA>
c 3 49 1  <NA> <NA> <NA> <NA>
> 
> message("Using integer64 in data.frame")
Using integer64 in data.frame
> str(as.data.frame(x))
'data.frame':	26 obs. of  1 variable:
 $ x:integer64 1 2 1 2 1 2 1 2 ... 
> str(as.data.frame(y))
'data.frame':	3 obs. of  4 variables:
 $ A:integer64 1 NA NA 
 $ B:integer64 2 NA NA 
 $ C:integer64 1 NA NA 
 $ D:integer64 2 NA NA 
> str(data.frame(y))
'data.frame':	3 obs. of  4 variables:
 $ A:integer64 1 NA NA 
 $ B:integer64 2 NA NA 
 $ C:integer64 1 NA NA 
 $ D:integer64 2 NA NA 
> str(data.frame(I(y)))
'data.frame':	3 obs. of  1 variable:
 $ y:integer64 1 NA NA 2 NA NA 1 NA ... 
> d <- data.frame(x=x, y=runif(length(x), 0, 100))
> d
   x         y
a  1 71.761851
b  2 99.190609
c  1 38.003518
d  2 77.744522
e  1 93.470523
f  2 21.214252
g  1 65.167377
h  2 12.555510
i  0 26.722067
j  0 38.611409
k  0  1.339033
l  0 38.238796
m  0 86.969085
n 26 34.034900
o 37 48.208012
p 57 59.956583
q 90 49.354131
r 20 18.621760
s 89 82.737332
t 94 66.846674
u 66 79.423986
v 62 10.794363
w  6 72.371095
x 20 41.127443
y 17 82.094629
z 68 64.706019
> d$x
integer64
 [1] 1  2  1  2  1  2  1  2  0  0  0  0  0  26 37 57 90 20 89 94 66 62 6  20 17
[26] 68
> 
> message("Using integer64 with csv files")
Using integer64 with csv files
> fi64 <- tempfile()
> write.csv(d, file=fi64, row.names=FALSE)
> e <- read.csv(fi64, colClasses=c("integer64", NA))
> unlink(fi64)
> str(e)
'data.frame':	26 obs. of  2 variables:
 $ x:integer64 1 2 1 2 1 2 1 2 ... 
 $ y: num  71.8 99.2 38 77.7 93.5 ...
> identical.integer64(d$x,e$x)
[1] TRUE
> 
> message("Serializing and unserializing integer64")
Serializing and unserializing integer64
> dput(d, fi64)
> e <- dget(fi64)
> identical.integer64(d$x,e$x)
[1] TRUE
> e <- d[,]
> save(e, file=fi64)
> rm(e)
> load(file=fi64)
> identical.integer64(d,e)
[1] TRUE
> 
> ### A couple of unit tests follow hidden in a dontshow{} directive ###
>   ## Don't show: 
> message("Testing identical.integer64")
Testing identical.integer64
> i64 <- as.double(NA); class(i64) <- "integer64"
> stopifnot(identical(unclass(i64-1), unclass(i64+1)))
> stopifnot(identical(i64-1, i64+1))
> stopifnot(!identical.integer64(i64-1, i64+1))
> 
> message("Testing dispatch of 'c' method")
Testing dispatch of 'c' method
> stopifnot(identical.integer64(c(integer64(0), NA), as.integer64(NA)))
> message("Dispatch on the second argument fails and we want to be notified once that changes")
Dispatch on the second argument fails and we want to be notified once that changes
> stopifnot(!identical.integer64(c(NA, integer64(0)), as.integer64(NA)))
> 
> message("Testing minus and plus")
Testing minus and plus
> d64 <- c(-.Machine$double.base^.Machine$double.digits, -.Machine$integer.max, -1, 0, 1, .Machine$integer.max, .Machine$double.base^.Machine$double.digits)
> i64 <- as.integer64(d64)
> stopifnot(identical.integer64(i64-1+1,i64))
> stopifnot(identical.integer64(i64+1-1,i64))
> 
> message("Testing minus and plus edge cases and 'rev'\n")
Testing minus and plus edge cases and 'rev'

> stopifnot(identical.integer64(lim.integer64()+1-1, c(lim.integer64()[1], NA)))
Warning in `+.integer64`(lim.integer64(), 1) :
  NAs produced by integer64 overflow
> stopifnot(identical.integer64(rev(lim.integer64())-1+1, c(lim.integer64()[2], NA)))
Warning in `-.integer64`(rev(lim.integer64()), 1) :
  NAs produced by integer64 overflow
> 
> message("Testing 'range.integer64', multiplication and integer division")
Testing 'range.integer64', multiplication and integer division
> i64 <- integer64(63)
> i64[1] <- 1
> for (i in 2:63)
+ 	i64[i] <- 2*i64[i-1]
> stopifnot(identical.integer64(i64 * rev(i64), rep(i64[63], 63)))
> for (i in 63:2)
+ 	i64[i-1] <- i64[i]%/%2
> stopifnot(identical.integer64(i64 * rev(i64), rep(i64[63], 63)))
> for (i in 63:2)
+ 	i64[i-1] <- i64[i]/2
> stopifnot(identical.integer64(i64 * rev(i64), rep(i64[63], 63)))
> stopifnot(identical.integer64(c( -i64[63] - (i64[63]-1), i64[63]+(i64[63]-1) ), lim.integer64()))
> 
> stopifnot(identical.integer64(i64[-1]%/%2*as.integer64(2), i64[-1]))
> stopifnot(identical.integer64(i64[-1]%/%2L*as.integer64(2), i64[-1]))
> stopifnot(identical.integer64(i64[-1]/2*as.integer64(2), i64[-1]))
> stopifnot(identical.integer64(i64[-1]/2*as.integer64(2), i64[-1]))
> 
> stopifnot(identical.integer64(i64[-63]*2%/%2, i64[-63]))
> stopifnot(identical.integer64(i64[-63]*2L%/%2L, i64[-63]))
> stopifnot(identical.integer64(as.integer64(i64[-63]*2/2), i64[-63]))
> stopifnot(identical.integer64(as.integer64(i64[-63]*2L/2L), i64[-63]))
> 
> message("Testing sqrt, power and log")
Testing sqrt, power and log
> stopifnot(identical.integer64( as.integer64(sqrt(i64[-1][c(FALSE, TRUE)])*sqrt(i64[-1][c(FALSE, TRUE)])), i64[-1][c(FALSE, TRUE)] ))
> 
> stopifnot(identical.integer64(as.integer64(2)^(0:62), i64))
> stopifnot(identical.integer64(as.integer64(0:62), as.integer64(round(log2(i64)))))
> stopifnot(identical.integer64(as.integer64(round(log(as.integer64(2)^(0:62), 2))), as.integer64(0:62)))
> stopifnot(identical.integer64(as.integer64(round(log(as.integer64(3)^(0:39), 3))), as.integer64(0:39)))
> stopifnot(identical.integer64(as.integer64(round(log(as.integer64(10)^(0:18), 10))), as.integer64(0:18)))
> stopifnot(identical.integer64(as.integer64(round(log10(as.integer64(10)^(0:18)))), as.integer64(0:18)))
> 
> stopifnot(identical.integer64((as.integer64(2)^(1:62))^(1/1:62), as.integer64(rep(2, 62))))
> stopifnot(identical.integer64((as.integer64(3)^(1:39))^(1/1:39), as.integer64(rep(3, 39))))
> stopifnot(identical.integer64((as.integer64(10)^(1:18))^(1/1:18), as.integer64(rep(10, 18))))
> 
> message("Testing c and rep")
Testing c and rep
> stopifnot(identical.integer64( as.integer64(rep(1:3, 1:3)), rep(as.integer64(1:3), 1:3)))
> stopifnot(identical.integer64( as.integer64(rep(1:3, 3)), rep(as.integer64(1:3), 3)))
>  
> x <- as.double(c(NA,NA,NA))
> class(x) <- "integer64"
> x <- x + -1:1
> stopifnot(identical.integer64(rep(x, 3), c(x,x,x) ))
> stopifnot(identical.integer64(c.integer64(list(x,x,x), recursive=TRUE), c(x,x,x) ))
> 
> message("Testing seq")
Testing seq
> stopifnot(identical.integer64(seq(as.integer64(1), 10, 2), as.integer64(seq(1, 10, 2)) ))
> stopifnot(identical.integer64(seq(as.integer64(1), by=2, length.out=5), as.integer64(seq(1, by=2, length.out=5)) ))
> stopifnot(identical.integer64(seq(as.integer64(1), by=2, length.out=6), as.integer64(seq(1, by=2, length.out=6)) ))
> stopifnot(identical.integer64(seq.integer64(along.with=3:5), as.integer64(seq(along.with=3:5)) ))
> stopifnot(identical.integer64(seq(as.integer64(1), to=-9), as.integer64(seq(1, to=-9)) ))
> 
> message("Testing cbind and rbind")
Testing cbind and rbind
> stopifnot(identical.integer64( cbind(as.integer64(1:3), 1:3), {x <- rep(as.integer64(1:3), 2); dim(x)<-c(3,2);x}))
> stopifnot(identical.integer64( rbind(as.integer64(1:3), 1:3), t({x <- rep(as.integer64(1:3), 2); dim(x)<-c(3,2);x})))
> 
> message("Testing coercion")
Testing coercion
> stopifnot(identical( as.double(as.integer64(c(NA, seq(0, 9, 0.25)))), as.double(as.integer(c(NA, seq(0, 9, 0.25))))))
> stopifnot(identical( as.character(as.integer64(c(NA, seq(0, 9, 0.25)))), as.character(as.integer(c(NA, seq(0, 9, 0.25))))))
> stopifnot(identical( as.integer(as.integer64(c(NA, seq(0, 9, 0.25)))), as.integer(c(NA, seq(0, 9, 0.25)))))
> stopifnot(identical( as.logical(as.integer64(c(NA, seq(0, 9, 0.25)))), as.logical(as.integer(c(NA, seq(0, 9, 0.25))))))
> stopifnot(identical( as.integer(as.integer64(c(NA, FALSE, TRUE))), as.integer(c(NA, FALSE, TRUE))))
> stopifnot(identical( as.integer64(as.integer(as.integer64(-9:9))), as.integer64(-9:9)))
> stopifnot(identical( as.integer64(as.double(as.integer64(-9:9))), as.integer64(-9:9)))
> stopifnot(identical( as.integer64(as.character(as.integer64(-9:9))), as.integer64(-9:9)))
> stopifnot(identical( as.integer64(as.character(lim.integer64())), lim.integer64()))
> 
> message("-- testing logical operators --")
-- testing logical operators --
> stopifnot(identical.integer64(!c(NA, -1:1), !c(as.integer64(NA), -1:1)))
> stopifnot(identical.integer64(rep(c(NA, -1:1), 4)&rep(c(NA, -1:1), rep(4, 4)), as.integer64(rep(c(NA, -1:1), 4))&as.integer64(rep(c(NA, -1:1), rep(4, 4)))))
> stopifnot(identical.integer64(rep(c(NA, -1:1), 4)|rep(c(NA, -1:1), rep(4, 4)), as.integer64(rep(c(NA, -1:1), 4))|as.integer64(rep(c(NA, -1:1), rep(4, 4)))))
> stopifnot(identical.integer64(xor(rep(c(NA, -1:1), 4),rep(c(NA, -1:1), rep(4, 4))), xor(as.integer64(rep(c(NA, -1:1), 4)),as.integer64(rep(c(NA, -1:1), rep(4, 4))))))
Error in identical.integer64(xor(rep(c(NA, -1:1), 4), rep(c(NA, -1:1),  : 
  no applicable method for 'xor' applied to an object of class "c('integer', 'numeric')"
Calls: stopifnot ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted