Please see the FAQ: What's a reproducible example (`reprex`) and how do I create one? Using a reprex, complete with representative data will attract quicker and more answers.
A reprex
should be cut and paste including all libraries data and functions needed to run (?? minimize has no functions by that name)