Displays a sparse_numeric object in a readable form, showing its length and all non-zero elements with their positions.

# S4 method for class 'sparse_numeric'
show(object)

Arguments

object

A sparse_numeric object.

Value

NULL. Prints information to the console.

Examples

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