Skip to content

Fix logical index length in calc_logticks() - #6930

Open
SAY-5 wants to merge 1 commit into
tidyverse:mainfrom
SAY-5:fix-logticks-index-length
Open

SAY-5 wants to merge 1 commit into
tidyverse:mainfrom
SAY-5:fix-logticks-index-length

Conversation

@SAY-5

@SAY-5 SAY-5 commented Nov 19, 2026

Copy link
Copy Markdown

Fixes #6906.

calc_logticks() appends the final tick to ticks but builds cycleIdx from ticknums only, so the logical indices used to set tickend are one element short and R-devel warns about it. Covering the last tick with c(ticknums, 1) - 1 gives the same tick lengths as before, since recycling already gave the last tick the major length. I don't have R-devel locally, so I checked the old code with a [<- that warns the way R-devel does; the new test should fail on the devel CI job without the fix.

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>

This branch has not been deployed

No deployments
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.

annotation_logticks() warns on R-devel: object length is not a multiple of subscript length

1 participant