Open RobinHankin opened 3 years ago
This will have to change now that disordR
is used for powers()
:
> a <- powers(icons)
> a
A disord object with hash ad0406e6ee0113993b786b4e0eaff22259afed97 and elements
[1] 24 -20 -9 -15 -11 -18 -16 32 -18 -8 -18 14 30 24 9
(in some order)
> names(a) <- sapply(brackets(icons),paste,collapse=" ")
> a
A disord object with hash ad0406e6ee0113993b786b4e0eaff22259afed97 and elements
[1] 24 -20 -9 -15 -11 -18 -16 32 -18 -8 -18 14 30 24 9
(in some order)
>
(above, we see that the names attribute is not taken up).
The returned object should be of class frab
:
namedpowers <- function(H){
frab(setNames(elements(powers(H)),sapply(elements(brackets(H)),paste,collapse=" ")))
}
Issue #100 notwithstanding, look at this:
It took me some time to arrive at the idiom needed to set the names of
a
nicely. It might be good to include such names inpowers()
.