geom_sii_riskconnection: geom_sii_riskconnection

Description Usage Arguments Value Examples

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

1
2
3
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 sii_z_ex2_data or sii_z_ex3_data

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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()
)

vanzanden/ggsolvencyii documentation built on May 31, 2019, 5:23 p.m.