Print Methods
object to be printed (SOA, OSOA, MDLE, Spattern)
further arguments for function print
no value is returned
myOSOA <- OSOAs_regular(s=3, k=3, optimize=FALSE)
myOSOA
#> [,1] [,2] [,3] [,4]
#> [1,] 0 2 0 2
#> [2,] 13 13 1 14
#> [3,] 26 24 2 26
#> [4,] 25 12 12 1
#> [5,] 2 26 13 13
#> [6,] 12 1 14 25
#> [7,] 14 25 24 0
#> [8,] 24 0 25 12
#> [9,] 1 14 26 24
#> [10,] 10 10 10 10
#> [11,] 23 21 11 22
#> [12,] 6 8 9 7
#> [13,] 8 23 22 9
#> [14,] 9 7 23 21
#> [15,] 22 9 21 6
#> [16,] 21 6 7 11
#> [17,] 7 11 8 23
#> [18,] 11 22 6 8
#> [19,] 20 18 20 18
#> [20,] 3 5 18 3
#> [21,] 16 16 19 15
#> [22,] 15 4 5 20
#> [23,] 19 15 3 5
#> [24,] 5 20 4 17
#> [25,] 4 17 17 19
#> [26,] 17 19 15 4
#> [27,] 18 3 16 16
#> OSOA, strength 2*
str(myOSOA) ## structure for comparison
#> 'SOA' num [1:27, 1:4] 0 13 26 25 2 12 14 24 1 10 ...
#> - attr(*, "type")= chr "OSOA"
#> - attr(*, "strength")= chr "2*"
#> - attr(*, "phi_p")= num 0.101
#> - attr(*, "optimized")= logi FALSE
#> - attr(*, "call")= language OSOAs_regular(s = 3, k = 3, optimize = FALSE)
Spat <- Spattern(myOSOA, s=3)
dim_wt_tab(Spat) ## print method prints NAs as .
#> 1 2 3 4 Sum
#> 1 0 0 0 . 0
#> 2 . 0 0 36 36
#> 3 . . 2 18 20
#> 4 . . . 0 0
#> Sum 0 0 2 54 56
print(dim_wt_tab(Spat), na.print=" ")
#> 1 2 3 4 Sum
#> 1 0 0 0 0
#> 2 0 0 36 36
#> 3 2 18 20
#> 4 0 0
#> Sum 0 0 2 54 56