If more than one index is available, the function performs a Principal
Component Analysis and produces a plot showing the contribution of the
indexes to the PC1 (see pca()
). If an index is declared in
index
and a cut point in cut_point
, the number and proportion of objects
with mean value of index
bellow and above cut_point
are returned.
Additionaly, the number and proportion of pixels bellow and above the
cutpoint is shown for each object (id).
Usage
summary_index(
object,
index = NULL,
cut_point = NULL,
select_higher = FALSE,
plot = TRUE,
type = "var",
...
)
Arguments
- object
An object computed with
analyze_objects()
.- index
The index desired, e.g.,
"B"
. Note that these value must match the index(es) used in the argumentobject_index
ofanalyze_objects()
.- cut_point
The cut point.
- select_higher
If
FALSE
(default) selects the objects withindex
smaller than thecut_point
. Useselect_higher = TRUE
to select the objects withindex
higher thancut_point
.- plot
Shows the contribution plot when more than one index is available? Defaults to
TRUE
.- type
The type of plot to produce. Defaults to
"var"
. See more atget_biplot()
.- ...
Further arguments passed on to
get_biplot()
.
Value
A list with the following elements:
ids
The identification of selected objects.between_id
A data frame with the following columnsn
The number of objects.nsel
The number of selected objects.prop
The proportion of objects selected.mean_index_sel
, andmean_index_nsel
The mean value ofindex
for the selected and non-selected objects, respectively.
within_id
A data frame with the following columnsid
The object identificationn_less
The number of pixels with values lesser than or equal tocut_point
.n_greater
The number of pixels with values greater thancut_point
.less_ratio
The proportion of pixels with values lesser than or equal tocut_point
.greater_ratio
The proportion of pixels with values greater thancut_point
.
pca_res
An object computed withpca()
Author
Tiago Olivoto tiagoolivoto@gmail.com
Examples
if (interactive() && requireNamespace("EBImage")) {
library(pliman)
soy <- image_pliman("soy_green.jpg")
anal <- analyze_objects(soy, object_index = "G", pixel_level_index = TRUE)
plot_measures(anal, measure = "G")
summary_index(anal, index = "G", cut_point = 0.5)
}