Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

`as_integers` and `as_doubles` should understand logical inputs

Open
#297 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp, r
Domain
tooling

Research direction

Start by reading the as_integers and as_doubles entry points, along with the existing as_integer conversion and the work referenced in #265. Reproduce the all-NA logical-input case described in the issue, then verify that logical inputs are handled consistently by both conversions and that the relevant tests pass.

Written by the indexing model from the issue text.

Description

Arguably logicals are also "integer like", but the main use case is the all-NA input vectors. When a user enters xyz(arg = NA) and arg is intended to be an integer the cpp level conversion with as_integers fails.

For this reason as_integers is still incomplete because we still need a custom wrapper around as_integer for logicals internally.

Would be really great if it could be done as part of #265 (cc @DavisVaughan)

Dominant language
C++
Stars
224
Forks
52
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

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/cpp11

All issues in r-lib/cpp11

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.