setDefault.Rd
Sets object specific default for recurring arguments
such as pt_alpha
, pt_clrp
, verbose
.
setDefault(object, ...)
An object of class SPATA2
or, in case of S4 generics,
objects of classes for which a method has been defined.
Named arguments whose default input you want to override.
The updated input object, containing the added, removed or computed results.
library(SPATA2)
object1 <- loadExampleObject("UKFT269T", meta = TRUE)
object2 <- loadExmapleObject("UKF275T", meta = TRUE)
# current
getDefault(object1, arg = "pt_clrp")
getDefault(object2, arg = "pt_clrp")
# if not specified, the function uses the object specific default
plotSurface(object1, color_by = "bayes_space")
plotSurface(object2, color_by = "bayes_space")
# overwrite
object1 <- setDefault(object1, pt_clrp = "uc")
objct2 <- setDefault(object2, pt_clrp = "jco")
# if not specified, the function uses the object specific default
# default has changed
plotSurface(object1, color_by = "bayes_space")
plotSurface(object2, color_by = "bayes_space")
# manually speciyfing the argument overwrites the default
plotSurface(object1, color_by = "bayes_space", pt_clrp = "jama")
plotSurface(object2, color_by = "bayes_space", pt_clrp = "tab20")