-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Invalid handling of Joint positions in mfl_starterpositions #399
Comments
Yeah I’ve been thinking about this one since you mentioned it. Here are the official documentation notes for how MFL uses combo positions: https://www46.myfantasyleague.com/2023/support?L=22627&CATEGORY=Players%20%26%20Lineups&SUBCATEGORY=Lineup%20Setup
|
With that in mind and also your comments about DT+DE etc, I’m currently thinking the right approach is to add the option to split the positions as an argument (defaulting to split = TRUE to preserve current behaviour), and then setting any combo positions to a minimum of zero if the split process happens |
I think that works best, with maybe a note on the defensive edge case in the documentation. |
Describe the bug
joint positions such as WR+TE are handled incorrectly. The result of ff_starter_positions is
pos | min | max
WR | 1 | 1
TE | 1 | 1
When it should be
pos | min | max
WR | 0 | 1
TE | 0 | 1
The offending line seems to be the
tidyr::separate_rows("pos",sep = "+")
At line 50, as that will keep the value for the minimum as 1 when the minimum for those positions is technically 0.
For defense, there is an additional potential problem that could happen even as a result of this fix.
Since there is DT+DE and CB+S, a valid conversion of 1 of each position would be
pos | min | max | defense_starters
DT | 0 | 1 | 2
DE | 0 | 1 | 2
CB | 0 | 1 | 2
S | 0 | 1 | 2
However, reading this would imply that a DT and a DE would be valid result, but only 1 from that group is actually valid via the MFL scoring settings. The only valid way to keep all of this information is to either pass WR+TE, DT+DE, and CB+S as a position, or to add additional columns that describe minimum and maximum limits for the groupings.
Reprex
Create an MFL league and set the positions to 1 WR+TE, 1 DT+DE, and 1 CB+S position. While the free trial is going, 19740 has these options set.
Expected behavior
The positions table has 0 for the minimum of every position instead of the current result of 1.
Session information
Please copy the output of
ffscrapr::ffverse_sitrep()
into the box below.The text was updated successfully, but these errors were encountered: