FIELDimageR: A R package to analyze orthomosaic images from agricultural field trials. This package is a compilation of functions to analyze pos-mosaicking images from research fields, and allows to: crop the image; remove soil effect; build vegetation indices; rotate the image; build the plot shapefile; extract information for each plot; and evaluate stand count, canopy percentage, and plant height.
GNU General Public License v2.0
230
stars
89
forks
source link
Use `withr::local_par` to set graphical parameters #25
Would you consider using withr::local_par to set the graphical parameters?
The current code sets the graphical windows to par(mfrow = c(1, 1)) at the end of functions. However, this line of code won't be executed if the functions exit prematurely. It also forcibly set the user's graphical windows to c(1, 1) which might not be desirable.
withr::local_par will only set the parameters in the local scope and revert the parameters back to its original state whenever functions stop running.
Hi,
Would you consider using
withr::local_par
to set the graphical parameters?The current code sets the graphical windows to
par(mfrow = c(1, 1))
at the end of functions. However, this line of code won't be executed if the functions exit prematurely. It also forcibly set the user's graphical windows toc(1, 1)
which might not be desirable.withr::local_par
will only set the parameters in the local scope and revert the parameters back to its original state whenever functions stop running.