show-sparse_numeric-method.Rd
Displays a sparse_numeric object in a readable form, showing its length and all non-zero elements with their positions.
sparse_numeric
# S4 method for class 'sparse_numeric' show(object)
A sparse_numeric object.
NULL. Prints information to the console.
NULL
x <- new("sparse_numeric", value = c(1,2), pos = c(2L,5L), length = 6L) x # Calls show() #> sparse_numeric object of length 6 #> Non-zero elements: #> pos value #> 1 2 1 #> 2 5 2