Skip to content

add na.rm argument to first/last and gfirst/glast#4730

Closed
ben-schwen wants to merge 9 commits intoRdatatable:masterfrom
ben-schwen:last_first_narm
Closed

add na.rm argument to first/last and gfirst/glast#4730
ben-schwen wants to merge 9 commits intoRdatatable:masterfrom
ben-schwen:last_first_narm

Conversation

@ben-schwen
Copy link
Copy Markdown
Member

@ben-schwen ben-schwen commented Oct 1, 2020

Closes #4446
Closes #4239

Adds an na.rm argument with default na.rm=FALSE to first()/last() and gfirst()/glast().

Here should be noted that gfirst() and glast() return the first resp. last non NA value if such a value exists. If such a value does not exist gfirst()/glast() still return NA similar to gmedian(), gvar() and gsd().

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 3, 2020

Codecov Report

Merging #4730 into master will decrease coverage by 0.25%.
The diff coverage is 67.24%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4730      +/-   ##
==========================================
- Coverage   99.44%   99.18%   -0.26%     
==========================================
  Files          73       73              
  Lines       14539    14649     +110     
==========================================
+ Hits        14458    14530      +72     
- Misses         81      119      +38     
Impacted Files Coverage Δ
src/gsumm.c 96.50% <63.26%> (-3.12%) ⬇️
R/last.R 96.87% <87.50%> (-3.13%) ⬇️
R/data.table.R 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ba2d7bb...3db430c. Read the comment docs.

Comment thread R/last.R Outdated
Comment thread R/last.R Outdated
Comment thread src/gsumm.c Outdated
Comment thread src/gsumm.c Outdated
Comment thread src/gsumm.c Outdated
Comment thread src/gsumm.c Outdated
Comment thread src/gsumm.c Outdated
Copy link
Copy Markdown
Member

@jangorecki jangorecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last comment about styling, other than that it looks good

Comment thread src/gsumm.c Outdated
@ben-schwen
Copy link
Copy Markdown
Member Author

Closing here since incompatible with merged #5109

@ben-schwen ben-schwen closed this Sep 11, 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

Successfully merging this pull request may close these issues.

Add a na.rm argument to first()/last() FR: na.rm in first/last

3 participants