geom_sii_riskconnection {ggsolvencyii} | R Documentation |
geom_sii_riskconnection
Description
returns a 'ggplot2' object, based on geom_segment.; it plots a line between (x and y coordinates of) those datapoints which have a matching value in the columns 'id' and 'comparewithid'. values in 'id' must be unique. For values in 'comparewithid' is uniqueness not required, but a matching value in 'id' must be present.
Usage
geom_sii_riskconnection(data = NULL, mapping = NULL,
stat = "sii_riskconnection", position = "identity", na.rm = FALSE,
show.legend = NA, inherit.aes = TRUE, ...)
Arguments
data |
the dataset in tidyverse format (column 'description' as a factor). see examples in |
mapping |
required aes(thetics) : 'x' (i.e. time, longitude, integer), 'y' (i.e SCR ratio, lattitude), 'id' and also 'comparewithid' |
stat |
default stat is statsii_riskconnection, combinations with other stat's are not tested |
position |
standard ggplot function |
na.rm |
standard ggplot function |
show.legend |
standard ggplot function |
inherit.aes |
standard ggplot function |
... |
ellipsis, a standard R parameter |
Value
a 'ggplot2' object based on 'geom_polygon'
Examples
library(ggsolvencyii)
library(ggplot2)
sii_z_ex3_data[sii_z_ex3_data$description == "SCR", ]
ggplot() + geom_sii_riskconnection(data = sii_z_ex3_data, mapping = aes(
comparewithid = comparewithid,
x = time,
y = ratio,
id = id,
),
color = "red",
lwd = 0.7,
arrow = arrow()
)