constructors: Slot Modification

constructorsR Documentation

Slot Modification

Description

Modify slots of spam objects

Usage

rowpointers( x) <- value
colindices( x) <- value
entries( x) <- value

Arguments

x

a spam matrix

value

vector of appropriate length.

Details

Various tests are performed. Thus much slower than direct assignment.
Slot dimension should be changed through pad or dim

Value

Modified spam object.

Author(s)

Reinhard Furrer

Examples

x <- diag.spam( 2)  
rowpointers( x) <- c(1,1,3)

# The last line is equivalent to 
x@rowpointers <- as.integer( c(1,1,3))

spam documentation built on Oct. 23, 2023, 5:07 p.m.