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

Default 'useNames' argument - take 2 #232

Closed
HenrikBengtsson opened this issue May 26, 2023 · 5 comments
Closed

Default 'useNames' argument - take 2 #232

HenrikBengtsson opened this issue May 26, 2023 · 5 comments
Milestone

Comments

@HenrikBengtsson
Copy link
Owner

Alright, I've listened, and I thought about it, and then I thought about it even more. I think it's okay to make:

  • useNames = TRUE

the new default.

Advantages:

  • Name attributes are processed by default, which makes life easier for most people (less typing)
  • It is consistent with colMeans(), rowMeans(), colSums(), rowSums(), and apply()

Disadvantages:

  • It adds performance and memory overhead
  • Not everyone will know about useNames = FALSE (compared to everyone would know about useNames = TRUE if they need names)
  • It introduces a new overhead to existing packages (n=443; 2023-05-24)
  • Package maintainers who suffer from the new overhead might not notice for a long time, so it might be a while before they add useNames = FALSE

But, as others tried to convince me in the past, the advantages outweight the disadvantages.

So, the new plan is to go with useNames = TRUE.

FWIW, there are currently a few packages that will break when we make useNames = TRUE the default, cf. Issue #227. They have been informed several times already.

@HenrikBengtsson HenrikBengtsson added this to the Next release milestone May 26, 2023
const-ae added a commit to const-ae/sparseMatrixStats that referenced this issue May 30, 2023
* Update defaults
* Update documentation
* Start fixing unit tests
@const-ae
Copy link
Contributor

const-ae commented May 30, 2023

Hi Henrik, I started making sparseMatrixStats compatible with useNames = TRUE (const-ae/sparseMatrixStats@5441917). There is one edge case which I don't cover yet. matrixStats::colColsums output differs for matrices with no column name and matrices with a dimnames attribute set to NULL. ...

Moved to Issue #234.

@HenrikBengtsson
Copy link
Owner Author

Thanks for spotting this. Can you please repost this as a separate issue?

@HenrikBengtsson
Copy link
Owner Author

UPDATE: I'm doing the last validations before submitting this new version to CRAN.

@HenrikBengtsson
Copy link
Owner Author

matrixStats 1.0.0 is now on CRAN.

@const-ae
Copy link
Contributor

const-ae commented Jun 2, 2023

Congrats :)

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

2 participants