int64-class: Class '"int64"'

Description Objects from the Class Slots Extends Methods Author(s) See Also Examples

Description

Vector of signed 64 bit integers

Objects from the Class

Objects can be created by using the int64 function, by converting character vectors or integer vectors using the as.int64 function.

Slots

.Data:

list of integer vectors of length 2. Each int64 number is coded as two integers.

NAMES:

Used for names of vectors. This is only being used through the names and names<- functions.

Extends

Class "list", from data part. Class "vector", by class "list", distance 2.

Methods

[

signature(x = "int64"): ...

[<-

signature(x = "int64"): ...

Arith

signature(e1 = "ANY", e2 = "int64"): ...

Arith

signature(e1 = "int64", e2 = "ANY"): ...

Arith

signature(e1 = "int64", e2 = "int64"): ...

as.character

signature(x = "int64"): ...

Compare

signature(e1 = "ANY", e2 = "int64"): ...

Compare

signature(e1 = "int64", e2 = "ANY"): ...

Compare

signature(e1 = "int64", e2 = "int64"): ...

length

signature(x = "int64"): ...

Summary

signature(x = "int64"): ...

Math

signature(x = "int64"): ...

Math2

signature(x = "int64"): ...

c

signature(x = "int64"): ...

is.na

signature(x = "int64"): ...

Author(s)

Romain Francois. Sponsored the Google Open Source Programs Office.

See Also

as.int64 to convert character or integer vectors.

int64 to create new int64 vectors of a given size.

The uint64 class to represent unsigned 64 bit integer vectors.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
    x <- int64( 4 )
    
    # setting subsets
    x[1:2] <- 1:2
    x[3:4] <- c("123456789012345", "9876543219876")
    x
    
    # arithmetic operations
    x * 2L
    x + x
    x - 3L
    
    # arithmetic operations first convert both operands to 64 bit integer type
    # so some precision will be lost
    as.int64(1) + 1.5
    # but it feels appropriate for dealing with large values
    as.int64(43124567245667) + 1.5
    
    # logical operations
    x < 3L
    x != c( 1L, 2L )
    
    # Summary operations
    range( x )
    min( x )
    max( x )
    length(x)
    
    
    df <- data.frame( a = 1:4 )
    df$b <- x
    df
    
    as.character( x )
    
    

siddharthab/int64 documentation built on May 29, 2019, 9:58 p.m.