Last chance! 50% off unlimited learning
Sale ends in
Turn those base functions S3 generic which are used in bit64
from:to
#--as-cran complains about \method{:}{default}(from, to)
#--as-cran complains about \method{:}{integer64}(from, to)
is.double(x)
# S3 method for default
is.double(x)
# S3 method for integer64
is.double(x)
match(x, table, ...)
# S3 method for default
match(x, table, ...)
x %in% table
# S3 method for default
%in%(x, table)
rank(x, ...)
# S3 method for default
rank(x, ...)
order(...)
# S3 method for default
order(...)
integer64 vector: the values to be matched, optionally carrying a cache created with hashcache
integer64 vector: the values to be matched against, optionally carrying a cache created with hashcache
or sortordercache
scalar denoting first element of sequence
scalar denoting last element of sequence
ignored
Jens Oehlschlägel <Jens.Oehlschlaegel@truecluster.com>
The following functions are turned into S3 gernerics in order to dispatch methods for integer64
:
\code{\link{:}}
\code{\link{is.double}}
\code{\link{match}}
\code{\link{%in%}}
\code{\link{rank}}
\code{\link{order}}
bit64
, S3
is.double(as.integer64(1))
as.integer64(1):9
match(as.integer64(2), as.integer64(0:3))
as.integer64(2) %in% as.integer64(0:3)
unique(as.integer64(c(1,1,2)))
rank(as.integer64(c(1,1,2)))
order(as.integer64(c(1,NA,2)))
# \dontshow{
stopifnot(identical(match(as.integer64(2), as.integer64(0:3)), match(2, 0:3)))
stopifnot(identical(as.integer64(2) %in% as.integer64(0:3), 2 %in% 0:3))
stopifnot(identical(unique(as.integer64(c(1,1,2))), as.integer64(unique(c(1,1,2)))))
stopifnot(identical(rank(as.integer64(c(1,1,2))), rank(c(1,1,2))))
stopifnot(identical(order(as.integer64(c(1,NA,2))), order(c(1,NA,2))))
stopifnot(identical(order(as.integer64(c(1,NA,2)), decreasing=TRUE), order(c(1,NA,2), decreasing=TRUE)))
# }
Run the code above in your browser using DataLab