RobinHankin / permutations

https://robinhankin.github.io/permutations/
5 stars 3 forks source link

perm_matrix(id) #14

Closed RobinHankin closed 1 year ago

RobinHankin commented 5 years ago
> perm_matrix(id)
<0 x 0 matrix>

Not sure what would be desirable here? matrix(1,1,1)?

RobinHankin commented 5 years 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
> 
RobinHankin commented 3 years ago

current behaviour different:

> perm_matrix(id)
Error in dimnames(x) <- dn : 
  length of 'dimnames' [1] not equal to array extent
> 
RobinHankin commented 2 years ago

Back again:

> id
[1] ()
> perm_matrix(id)
<0 x 0 matrix>
>