This is not an Excel forum, if you need help on how to do this in R, please provide a proper REPRoducible EXample (reprex) illustrating your issue.
This is not an Excel forum, if you need help on how to do this in R, please provide a proper REPRoducible EXample (reprex) illustrating your issue.