Fatal error with sum_by

Open Beginner friendly
#17 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
r
Domain
data

Research direction

Start at the sum_by(y, by) function and reproduce the case where a matrix y has a different number of rows than by. Add a prevention check for the mismatched lengths, then verify that the function no longer causes a fatal error in RStudio.

Written by the indexing model from the issue text.

Description

For the function sum_by(y, by), if the number of rows of y (if y is a matrix) in different the the lenght of by, a fatal error append in RStudio. Is it possible to add a prevention check before perform the calcul to avoid such a error ?

Dominant language
R
Stars
9
Forks
3
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from InseeFr/gustave

All issues in InseeFr/gustave

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.