Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use full argument name for situations with restricted partial matching #1361

Merged
merged 5 commits into from
Nov 25, 2024

Conversation

MichaelChirico
Copy link
Contributor

@MichaelChirico MichaelChirico commented Apr 22, 2024

options(warnPartialMatchArgs=TRUE, warn=2L)
train(mpg ~ cyl, data=mtcars)
# Error in stats::model.frame(form = mpg ~ cyl, data = mtcars, na.action = na.fail) : 
#   (converted from warning) partial argument match of 'form' to 'formula'

Similar for seq(along=) and seq(length=).

@MichaelChirico MichaelChirico changed the title Rename 'form' to 'formula' for settings with partial matching restrictions Use full argument name for situations with restricted partial matching Apr 22, 2024
@MichaelChirico
Copy link
Contributor Author

BTW, personally I just use seq_along() instead of seq(along=) and seq_len() instead of seq(length=).

I can make the change to use those instead if you prefer.

@topepo
Copy link
Owner

topepo commented Nov 25, 2024

I have the same preference but

older_codes

We're good. Thanks

@topepo topepo merged commit 14dbdc5 into topepo:master Nov 25, 2024
7 checks passed
@MichaelChirico MichaelChirico deleted the patch-1 branch November 25, 2024 19:32
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.

2 participants