plot.FitSigma.batch: Plot the fitted seed viability curves from a 'FitSigma.batch'...

Description Usage Arguments Value See Also Examples

View source: R/plot.FitSigma.batch.R

Description

plot.FitSigma.batch plots the group-wise fitted seed viability/survival curves from a FitSigma.batch object as an object of class ggplot.

Usage

1
2
## S3 method for class 'FitSigma.batch'
plot(x, limits = TRUE, grid = FALSE, ...)

Arguments

x

An object of class FitSigma.batch obtained as output from the FitSigma.batch function.

limits

logical. If TRUE, set the limits of y axis (viability percentage) between 0 and 100 in the viability curve plot. If FALSE, limits are set according to the data. Default is TRUE.

grid

logical. If TRUE, a symmetric matrix grid of plots is produced instead of a single plot with multiple curves. Default is FALSE.

...

Default plot arguments.

Value

The plot of the seed viability curves as an object of class ggplot.

See Also

FitSigma.batch

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
data(seedsurvival)
df <- seedsurvival[seedsurvival$moistruecontent == 7 &
                     seedsurvival$temperature == 25,
                   c("crop", "storageperiod", "rep",
                     "viabilitypercent", "sampsize")]

#----------------------------------------------------------------------------
# Generalised linear model with probit link function (without cv)
#----------------------------------------------------------------------------
model1a <- FitSigma.batch(data = df, group = "crop",
                          viability.percent = "viabilitypercent",
                          samp.size = "sampsize",
                          storage.period = "storageperiod",
                          generalised.model = TRUE)
plot(model1a)
plot(model1a, grid = TRUE)

#----------------------------------------------------------------------------
# Generalised linear model with probit link function (with cv)
#----------------------------------------------------------------------------
model1b <- FitSigma.batch(data = df, group = "crop",
                          viability.percent = "viabilitypercent",
                          samp.size = "sampsize",
                          storage.period = "storageperiod",
                          generalised.model = TRUE,
                          use.cv = TRUE, control.viability = 98)
plot(model1b)
plot(model1b, grid = TRUE)

#----------------------------------------------------------------------------
# Linear model after probit transformation (without cv)
#----------------------------------------------------------------------------
model2a <- FitSigma.batch(data = df, group = "crop",
                          viability.percent = "viabilitypercent",
                          samp.size = "sampsize",
                          storage.period = "storageperiod",
                          generalised.model = FALSE)
plot(model2a)
plot(model2a, grid = TRUE)

#----------------------------------------------------------------------------
# Linear model after probit transformation (with cv)
#----------------------------------------------------------------------------
model2b <- FitSigma.batch(data = df, group = "crop",
                          viability.percent = "viabilitypercent",
                          samp.size = "sampsize",
                          storage.period = "storageperiod",
                          generalised.model = FALSE,
                          use.cv = TRUE, control.viability = 98)
plot(model2b)
plot(model2b, grid = TRUE)

aravind-j/viabilitymetrics documentation built on May 15, 2021, 9:10 a.m.