Setting up a soap film smoother is often a hard and frustrating process. This packages provides functions that checks the boundary, knots, and data that you feed to a soap are “correct”. The functions in the package will also plot the area that will be modeled by the soap film smoother in red, and knots and/or data as circles as viable locations. Any circles that have a X through them are considered inadequate and will need to be removed.
To do the spatial analysis, we require a couple of extra libraries: {sf} and {mgcv}. That will be loaded when installing {soapcheckr}.
{soapcheckr} can be installed using the following code;
install.packages("devtools")
devtools::install_github("dill/soapcheckr")
Next load {soapcheckr} and walk through the vignette to see how to use
the functions. We highly encourage walking through both examples in the
vignette.
library(soapcheckr)
vignette("how_to_use_soapcheckr")
k and nmax argument in
autocruncher() to be the same as your planned value in gam() for
your soap film smootherx and y
unless you supply the naming arguments with the column names from your
data.tol = 1e-6)
argument when using soap_check()
list of lists or data.frames.
So if you have a polygon boundary with your boundary vertices in it,
that must be wrapped in a list! The vector names of each boundary
need to be names x and y for the functions to work.Written by David L. Miller and Benjamin L. Hlina. Released under the GPL (version 2).