Description
plotBiomass, plotYield, and plotYieldGear use sim as the name of the first argument, while every other plot function (plotSpectra, plotCDF, plotFeedingLevel, plotPredMort, plotFMort, plotDiet, plotGrowthCurves, …) uses object.
Since these are S3 generics the name is purely cosmetic, but it is inconsistent and misleading — especially for functions that accept both MizerSim and MizerParams objects (which plotBiomass does not currently, but the others do).
Suggested fix
Rename the first argument of plotBiomass, plotYield, and plotYieldGear (and their .MizerSim methods and plotly* wrappers) from sim to object, matching the rest of the family.
This is a purely cosmetic change with no effect on behaviour. Existing calls using positional arguments are unaffected; calls using sim = ... as a named argument would break, but named use of a first S3 dispatch argument is extremely rare.
Description
plotBiomass,plotYield, andplotYieldGearusesimas the name of the first argument, while every other plot function (plotSpectra,plotCDF,plotFeedingLevel,plotPredMort,plotFMort,plotDiet,plotGrowthCurves, …) usesobject.Since these are S3 generics the name is purely cosmetic, but it is inconsistent and misleading — especially for functions that accept both
MizerSimandMizerParamsobjects (whichplotBiomassdoes not currently, but the others do).Suggested fix
Rename the first argument of
plotBiomass,plotYield, andplotYieldGear(and their.MizerSimmethods andplotly*wrappers) fromsimtoobject, matching the rest of the family.This is a purely cosmetic change with no effect on behaviour. Existing calls using positional arguments are unaffected; calls using
sim = ...as a named argument would break, but named use of a first S3 dispatch argument is extremely rare.