Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/cliPublic

Handle non finite edge cases with pluralization()#716

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gaborcsardi merged 2 commits intor-lib:mainfromrundel:issue701
Aug 28, 2024

Conversation

@rundel
Copy link
Contributor

This is a draft resolution to#701 and some related edge cases. The issue seems to be more general than originally described with handling any of the non-finite values (including NAs).

The currently implemented behavior is the following:

  • Numeric non-finite values (NA_real_,NA_integer_,NaN,Inf and-Inf) will be treated as aqty > 1 for pluralization purposes.

  • Non-numeric NA values (NA_character_ andNA) are treated as a non-numeric input soqty is based on the vector's length.

I've opted not to throw an error for numericNAs orNaN cases since that seemed a bit severe but it also seems like a plausible outcome and happy to switch to that behavior if that is a better option.

Copy link
Member

@krlmlrkrlmlr left a comment

Choose a reason for hiding this comment

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

Thanks! The commit suggestions are just ideas and by no means authoritative.

@krlmlrkrlmlr requested a review fromhadleyAugust 15, 2024 18:37
Co-authored-by: Kirill Müller <krlmlr@users.noreply.github.com>
@gaborcsardi
Copy link
Member

gaborcsardi commentedAug 28, 2024
edited
Loading

Looks great, it is exactly the solution I had in mind. :D Thank you!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@gaborcsardigaborcsardigaborcsardi left review comments

@krlmlrkrlmlrkrlmlr left review comments

@hadleyhadleyAwaiting requested review from hadley

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@rundel@gaborcsardi@hadley@krlmlr

[8]ページ先頭

©2009-2025 Movatter.jp