Skip to content

docs: fix typo 'y' -> 'x' in between.Rd exclusive bounds description#7781

Closed
LeonidasZhak wants to merge 1 commit into
Rdatatable:masterfrom
LeonidasZhak:docs/fix-between-rd-typo
Closed

docs: fix typo 'y' -> 'x' in between.Rd exclusive bounds description#7781
LeonidasZhak wants to merge 1 commit into
Rdatatable:masterfrom
LeonidasZhak:docs/fix-between-rd-typo

Conversation

@LeonidasZhak
Copy link
Copy Markdown

Summary

Fixes a typo in the Description section of between.Rd where the exclusive bounds formula incorrectly uses y instead of x.

Problem

Line 11 of man/between.Rd states:

between is equivalent to lower<=x & x<=upper when incbounds=TRUE, or lower<x & y<upper when FALSE.

The second formula uses y but should use x. The variable being tested is always x in the between(x, lower, upper) function signature. The variable y is only used in the infix %between% operator where x %between% y and y is a length-2 vector/list.

Fix

Changed lower<x & y<upper to lower<x & x<upper.

Files Changed

File Lines Changed Type
man/between.Rd 1 Documentation

Validation

  • tools::checkRd('man/between.Rd') — passes (no errors)
  • Change is purely documentation (no code changes)

Stata Migration Relevance

This fix is important for Stata migrants who read the documentation to understand between() behavior. Stata's inrange() function has clear documentation about its bounds, and an incorrect formula in the R documentation could confuse users trying to understand when bounds are inclusive vs exclusive.

@LeonidasZhak
Copy link
Copy Markdown
Author

Withdrawing this small automated PR while I consolidate an oversized batch of contributions and reduce maintainer review burden. Sorry for the noise, and thank you for maintaining the project.

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.

1 participant