RobinHankin / spray

sparse arrays and fast multivariate polynomials
https://robinhankin.github.io/spray/
2 stars 2 forks source link

print() repeats its output #41

Closed RobinHankin closed 1 year ago

RobinHankin commented 1 year ago

(Issue #40 refers). Look:

suppressMessages(library("spray"))
a <- spray(diag(3))
print(a)
#>            val
#>  0 0 1  =    1
#>  0 1 0  =    1
#>  1 0 0  =    1
#>            val
#>  0 0 1  =    1
#>  0 1 0  =    1
#>  1 0 0  =    1

Created on 2023-07-03 with reprex v2.0.2

Compare base R:

x <- runif(3)
x
#> [1] 0.4543533 0.3738614 0.5407450
print(x)
#> [1] 0.4543533 0.3738614 0.5407450

Created on 2023-07-03 with reprex v2.0.2

(where there is no duplication)