plot.theil {surveil} | R Documentation |
Methods for Theil's index
Description
Printing and plotting methods for Theil's inequality index
Usage
## S3 method for class 'theil'
plot(
x,
style = c("mean_qi", "lines"),
M = 250,
col = "black",
fill = "black",
alpha,
lwd,
base_size = 14,
scale = 100,
labels = x$summary$time,
...
)
## S3 method for class 'theil_list'
plot(
x,
style = c("mean_qi", "lines"),
M = 250,
col = "black",
fill = "black",
alpha,
lwd,
between_title = "Between",
within_title = "Within",
total_title = "Total",
scale = 100,
plot = TRUE,
ncol = 3,
base_size = 14,
...
)
## S3 method for class 'theil'
print(x, scale = 100, digits = 3, ...)
## S3 method for class 'theil_list'
print(x, scale = 100, digits = 3, ...)
Arguments
x |
An object of class |
style |
If |
M |
If |
col |
Line color |
fill |
Fill color |
alpha |
For |
lwd |
Line width; for |
base_size |
Passed to |
scale |
Scale Theil's index by |
labels |
x-axis labels (time periods) |
... |
additional arguments |
between_title |
Plot title for the between geography component of Theil's T; defaults to "Between". |
within_title |
Plot title for the within geography component of Theil's T; defaults to "Within". |
total_title |
Plot title for Theil's index; defaults to "Total". |
plot |
If |
ncol |
Number of columns for the plotting device. If |
digits |
number of digits to print (passed to |
Value
plot.theil
The plot method returns an object of class ggplot
.
plot.theil_list
If style = "lines"
, the plot method for theil_list
objects returns a ggplot
with facets for each component of inequality (between-areas, within-areas, and total). For style = "mean_qi"
, the plot method returns either a list of plots (all of class ggplot
) or, when plot = TRUE
, it will draw them to current plotting device using grid.arrange
.
print.theil
The print returns nothing and method prints a summary of results to the R console.