Closed RobinHankin closed 1 year ago
Note that the following works:
> perm_matrix(as.word(1:5))
[,1] [,2] [,3] [,4] [,5]
[1,] 1 0 0 0 0
[2,] 0 1 0 0 0
[3,] 0 0 1 0 0
[4,] 0 0 0 1 0
[5,] 0 0 0 0 1
>
current behaviour different:
> perm_matrix(id)
Error in dimnames(x) <- dn :
length of 'dimnames' [1] not equal to array extent
>
Back again:
> id
[1] ()
> perm_matrix(id)
<0 x 0 matrix>
>
Not sure what would be desirable here?
matrix(1,1,1)
?