newXPtr: Creates a new XPtr object

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Creates a new XPtr of size n and initialize it with the constant k. Objects of class XPtr are just externalptr with attributes. They are used instead of classical dist to avoid copies. This makes RRP to work on bigger data sets.

Usage

1
newXPtr(n, k = 0)

Arguments

n

the size of the object

k

the initializing constant

Details

You should think about XPtr as dist objects, i.e. a representation of a symmetric matrix with 0's on the diagonals. XPtr are stored as lower diagonal matrices. The size n is the dimension of the corresponding matrix, say M, hence M is intended as a n * n matrix. The real length of the XPtr is n*(n-1)/2.

Value

returns a new XPtr if there is enough memory.

Author(s)

S.M. Iacus

References

Iacus, S.M., Porro, G. (2006) Random Recursive Partitioning and its applications to missing data imputation, classification and average treatment effect estimation, submitted.

See Also

rrp.dist, XPtrToDist

Examples

1
2
3
a <- newXPtr(10, 1)
(XPtrToDist(a))
as.dist(matrix(1,10,10))

rrp documentation built on May 2, 2019, 5:25 p.m.

Related to newXPtr in rrp...