Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[<-.multiPhylo does not support empty [] #35

Closed
ms609 opened this issue Oct 19, 2021 · 1 comment
Closed

[<-.multiPhylo does not support empty [] #35

ms609 opened this issue Oct 19, 2021 · 1 comment

Comments

@ms609
Copy link
Contributor

ms609 commented Oct 19, 2021

The syntax myList[] <- X typically allows entries of a list to be modified without overwriting attributes.

Compare:

myList <- structure(1:5, class = 'myClass')
class(myList) # "myClass"

myList[] <- sapply(myList, `*`, 2)
class(myList) # attributes retained

myList <- lapply(myList, `*`, 2)
class(myList) # attributes lost
@ms609 ms609 changed the title [<-.multiPhylo does not support empty [] c.multiPhylo loses tree names Oct 21, 2021
@ms609 ms609 changed the title c.multiPhylo loses tree names [<-.multiPhylo does not support empty [] Oct 21, 2021
@ms609
Copy link
Contributor Author

ms609 commented Oct 21, 2021

Accidental duplicate of #36, sorry!

@ms609 ms609 closed this as completed Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant