complete.cases fails in the presence of NA_integer64_

Open
#122 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
32/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
r
Domain
data

Research direction

Reproduce the example with complete.cases(data.frame(a = as.integer64(NA))) and read src/library/stats/R/complete.cases.R, especially the linked .External call. Determine the expected behavior for integer64 NA values and whether the package can provide a class-aware path; done means the reported case is handled and covered by a regression test.

Written by the indexing model from the issue text.

Description

complete.cases(data.frame(a = as.integer64(NA)))

AFAICT this cannot work because complete.cases() appeals directly to a .External() call:

https://github.com/r-devel/r-svn/blob/c9437a83b9677074fe01310caac6a2a66cc7f680/src/library/stats/R/complete.cases.R#L19

Is there anything that can be done here? Maybe a companion function complete_cases() or complete.cases64() that basically re-implements complete.cases() but is class-aware?

Dominant language
R
Stars
40
Forks
13
Avg merge
10h 24m
Merged PRs (30d)
2

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 r-lib/bit64

All issues in r-lib/bit64

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.