add_marks.RdMarks specific points in an scplot object.
add_marks(
object,
case = 1,
positions,
color = "red",
size = 1,
shape = 1,
variable = ".dvar"
)An scplot object (class scplot) returned from the scplot()
function.
Numerical vector with the case number or character string. case = "all" for all cases.
Either a vector indicating the points to be highlighted or a
character string with a logical expression (e.g. values < mean(values))
indicating the points to be highlighted. Alternatively, an object of class
sc_outlier returned from the scan::outlier() function can be used
to mark the detected outliers. A list of such vectors or expressions can
also be provided to add marks for multiple cases at once.
A character string or a number defining the color of an element.
Text size relative to the base text size.
Number. See pch graphical parameter on par help page
par().
Name of the dataline variable to apply the style.
An object of class scplot (see scplot()) with changed element
marks.
Marks are visualized as points on top of the existing plot. Multiple marks
can be added by calling add_marks() multiple times.
If positions is an object returned from an outlier analysis via
outlier(), the corresponding outliers are marked. If positions is a
list, marks are added for each case in the list.
The variable argument specifies the variable on which the marks are
applied. By default, the variable .dvar is used. If multiple cases are
plotted, the case argument specifies for which case(s) the marks are
added.