sad | R Documentation |
Given an object computed with measure_disease()
or measure_disease_byl()
a Standard Area Diagram (SAD) with n
images are returned with the
respective severity values.
sad(
object,
n,
show_original = FALSE,
show_contour = FALSE,
nrow = NULL,
ncol = NULL,
...
)
object |
An object computed with |
n |
The number of leaves in the Standard Area Diagram. |
show_original |
Show original images? Defaults to |
show_contour |
Show original images? Defaults to |
nrow, ncol |
The number of rows and columns in the plot. See [image_combine())] [image_combine())]: R:image_combine()) |
... |
Other arguments passed on to |
The leaves with the smallest and highest severity will always be in the SAD.
If n = 1
, the leaf with the smallest severity will be returned. The others
are sampled sequentially to achieve the n
images after severity has been
ordered in an ascending order. For example, if there are 30 leaves and n is
set to 3, the leaves sampled will be the 1st, 15th, and 30th with the
smallest severity values.
The SAD can be only computed if an image pattern name is used in argument
pattern
of measure_disease()
. If the images are saved, the n
images
will be retrevied from dir_processed
directory. Otherwise, the severity
will be computed again to generate the images.
A data frame with the severity values for the n
sampled leaves. A plot with
the standard area diagram can be saved by wrapping sad()
with png()
.
Del Ponte EM, Pethybridge SJ, Bock CH, et al (2017) Standard area diagrams for aiding severity estimation: Scientometrics, pathosystems, and methodological trends in the last 25 years. Phytopathology 107:1161–1174. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1094/PHYTO-02-17-0069-FI")}
## Not run:
library(pliman)
sev <-
measure_disease(pattern = "sev_leaf",
img_healthy = "sev_healthy",
img_symptoms = "sev_sympt",
img_background = "sev_back",
plot = FALSE,
save_image = TRUE,
show_original = FALSE,
dir_original = image_pliman(),
dir_processed = tempdir())
sad(sev, n = 2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.