Description Usage Arguments Value See Also Examples
Grafiek van tabel of reeks met Certe-kleuren. De data wordt automatsch geinterpreteerd en zonodig getransformeerd voordat de grafiek getekend wordt.
Voor x
, y
, x.category
, y.category
en datalabels
wordt quasiquotation
ondersteund.
Geldige types (type
) zijn "bar"
, "barpercent"
, "boxplot"
, "column"
, "density"
, "frequency"
, "histogram"
, "line"
, "lollipop"
, "point"
, "rsi"
en "mic"
.
De plot2.*
-functies zijn hier wrappers van.
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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 | plot2(data = NA, x = NA, y = NA, y.category = NA,
x.category = NA, type = "column", x.title = NA, y.title = NA,
title = NA, subtitle = "", caption = "", tag = "",
title_maxlength = 60, subtitle_maxlength = 60,
na.replace = "(onbekend)", na.rm = FALSE, x.category.fill = NA,
x.category.position = "top", x.category.bold = TRUE,
x.category.size = 10, x.category.repeat.lbls.x = TRUE,
x.category.repeat.lbls.y = TRUE, x.category.drop = FALSE,
x.category.nrow = NA, x.category.margin = 3.5,
x.category.relative = FALSE, x.date_breaks = "1 month",
x.date_labels = "mmm", y.category.focus = NULL,
colours = getOption("plot2.colours", "certe"), x.lbl.angle = 0,
x.lbl.align = NA, x.lbl.italic = FALSE, x.remove = FALSE,
x.position = "bottom", x.max = NA, x.max.txt = "(rest, x %n)",
y.remove = FALSE, y.24h = FALSE, y.age = FALSE,
y.percent = FALSE, y.percent.break = 10, y.scale = NA,
y.position = "left", sort.x = TRUE, sort.y.category = TRUE,
sort.x.category = TRUE, datalabels = TRUE,
datalabels.round = if_else(y.percent == FALSE, 2, 1),
datalabels.fill = "white", summarise_function = sum,
stacked = FALSE, stackedpercent = FALSE, horizontal = FALSE,
reverse = horizontal, smooth = FALSE, size = if_else(type ==
"line", 0.75, 2), bins = NULL, width = NULL, show.mean = FALSE,
break.S = NA, break.R = break.S, legend.position = "top",
legend.title = "", print = FALSE, font.family = "Calibri",
text.factor = 1, format.NL = Sys.isdecimalcomma(),
misses.data = FALSE, misses.x = FALSE, misses.y = FALSE,
misses.y.category = FALSE, misses.datalabels = FALSE,
certe_theme = TRUE, x.lbl = NA, ...)
plot2.column(data = NA, x = NA, y = NA, y.category = NA,
x.category = NA, x.title = NA, y.title = NA, title = NA,
subtitle = "", caption = "", tag = "", title_maxlength = 60,
subtitle_maxlength = 60, na.replace = "(onbekend)", na.rm = FALSE,
x.category.fill = NA, x.category.position = "top",
x.category.bold = TRUE, x.category.size = 10,
x.category.repeat.lbls.x = TRUE, x.category.repeat.lbls.y = TRUE,
x.category.drop = FALSE, x.category.nrow = NA,
x.category.margin = 3.5, x.category.relative = FALSE,
x.date_breaks = "1 month", x.date_labels = "mmm",
y.category.focus = NULL, colours = getOption("plot2.colours",
"certe"), x.lbl.angle = 0, x.lbl.align = NA, x.lbl.italic = FALSE,
x.position = "bottom", x.remove = FALSE, x.max = NA,
x.max.txt = "(rest, x %n)", y.remove = FALSE, y.24h = FALSE,
y.age = FALSE, y.percent = FALSE, y.percent.break = 10,
y.scale = NA, y.position = "left", sort.x = TRUE,
sort.y.category = TRUE, sort.x.category = TRUE, datalabels = TRUE,
datalabels.round = if_else(y.percent == FALSE, 2, 1),
datalabels.fill = "white", summarise_function = sum,
stacked = FALSE, stackedpercent = FALSE, reverse = FALSE,
width = NULL, legend.position = "top", legend.title = "",
print = FALSE, font.family = "Calibri", text.factor = 1,
format.NL = Sys.isdecimalcomma(), x.lbl = NA, ...)
plot2.area(data = NA, x = NA, y = NA, y.category = NA,
x.category = NA, x.title = NA, y.title = NA, title = NA,
subtitle = "", caption = "", tag = "", title_maxlength = 60,
subtitle_maxlength = 60, na.replace = "(onbekend)", na.rm = FALSE,
x.category.fill = NA, x.category.position = "top",
x.category.bold = TRUE, x.category.size = 10,
x.category.repeat.lbls.x = TRUE, x.category.repeat.lbls.y = TRUE,
x.category.drop = FALSE, x.category.nrow = NA,
x.category.margin = 3.5, x.category.relative = FALSE,
x.date_breaks = "1 month", x.date_labels = "mmm",
y.category.focus = NULL, colours = getOption("plot2.colours",
"certe"), x.lbl.angle = 0, x.lbl.align = NA, x.lbl.italic = FALSE,
x.position = "bottom", x.remove = FALSE, x.max = NA,
x.max.txt = "(rest, x %n)", y.remove = FALSE, y.24h = FALSE,
y.age = FALSE, y.percent = FALSE, y.percent.break = 10,
y.scale = NA, y.position = "left", sort.x = TRUE,
sort.y.category = TRUE, sort.x.category = TRUE, datalabels = TRUE,
datalabels.round = if_else(y.percent == FALSE, 2, 1),
datalabels.fill = "white", summarise_function = sum,
reverse = FALSE, legend.position = "top", legend.title = "",
print = FALSE, font.family = "Calibri", text.factor = 1,
format.NL = Sys.isdecimalcomma(), x.lbl = NA, ...)
plot2.bar(data = NA, x = NA, y = NA, y.category = NA,
x.category = NA, x.title = NA, y.title = NA, title = NA,
subtitle = "", caption = "", tag = "", title_maxlength = 60,
subtitle_maxlength = 60, na.replace = "(onbekend)", na.rm = FALSE,
x.category.fill = NA, x.category.position = "top",
x.category.bold = TRUE, x.category.size = 10,
x.category.repeat.lbls.x = TRUE, x.category.repeat.lbls.y = TRUE,
x.category.drop = FALSE, x.category.nrow = NA,
x.category.margin = 3.5, x.category.relative = FALSE,
x.date_breaks = "1 month", x.date_labels = "mmm",
y.category.focus = NULL, colours = getOption("plot2.colours",
"certe"), x.lbl.angle = 0, x.lbl.align = NA, x.lbl.italic = FALSE,
x.position = "bottom", x.remove = FALSE, x.max = NA,
x.max.txt = "(rest, x %n)", y.remove = FALSE, y.24h = FALSE,
y.age = FALSE, y.percent = FALSE, y.percent.break = 10,
y.scale = NA, y.position = "left", sort.x = TRUE,
sort.y.category = TRUE, sort.x.category = TRUE, datalabels = TRUE,
datalabels.round = if_else(y.percent == FALSE, 2, 1),
datalabels.fill = "white", summarise_function = sum,
stacked = FALSE, stackedpercent = FALSE, reverse = TRUE,
width = NULL, legend.position = "top", legend.title = "",
print = FALSE, font.family = "Calibri", text.factor = 1,
format.NL = Sys.isdecimalcomma(), x.lbl = NA, ...)
plot2.barpercent(data = NA, x = NA, y = NA, x.title = NA,
y.title = "", x.category = NA, title = NA, subtitle = "",
caption = "", tag = "", title_maxlength = 60,
subtitle_maxlength = 60, na.replace = "(onbekend)", na.rm = FALSE,
x.category.fill = NA, x.category.position = "top",
x.category.bold = TRUE, x.category.size = 10,
x.category.repeat.lbls.x = TRUE, x.category.repeat.lbls.y = TRUE,
x.category.drop = FALSE, x.category.nrow = NA,
x.category.margin = 3.5, x.category.relative = FALSE,
x.date_breaks = "1 month", x.date_labels = "mmm",
y.category.focus = NULL, colours = getOption("plot2.colours",
"certe"), x.lbl.angle = 0, x.lbl.align = NA, x.lbl.italic = FALSE,
x.position = "bottom", x.remove = FALSE, x.max = 10,
x.max.txt = "(rest, x %n)", y.remove = FALSE, y.scale = NA,
sort.y.category = TRUE, sort.x.category = TRUE, datalabels = TRUE,
datalabels.round = 1, datalabels.fill = "white", width = NULL,
summarise_function = sum, legend.position = "top",
legend.title = "", print = FALSE, font.family = "Calibri",
text.factor = 1, format.NL = Sys.isdecimalcomma(), x.lbl = NA, ...)
plot2.lollipop(data = NA, x = NA, y = NA, y.category = NA,
x.category = NA, x.title = NA, y.title = NA, title = NA,
subtitle = "", caption = "", tag = "", title_maxlength = 60,
subtitle_maxlength = 60, na.replace = "(onbekend)", na.rm = FALSE,
x.category.fill = NA, x.category.position = "top",
x.category.bold = TRUE, x.category.size = 10,
x.category.repeat.lbls.x = TRUE, x.category.repeat.lbls.y = TRUE,
x.category.drop = FALSE, x.category.nrow = NA,
x.category.margin = 3.5, x.category.relative = FALSE,
x.date_breaks = "1 month", x.date_labels = "mmm",
y.category.focus = NULL, colours = getOption("plot2.colours",
"certe"), x.lbl.angle = 0, x.lbl.align = NA, x.lbl.italic = FALSE,
x.position = "bottom", x.remove = FALSE, x.max = NA,
x.max.txt = "(rest, x %n)", y.remove = FALSE, y.24h = FALSE,
y.age = FALSE, y.percent = FALSE, y.percent.break = 10,
y.scale = NA, y.position = "left", sort.x = TRUE,
sort.y.category = TRUE, sort.x.category = TRUE, datalabels = TRUE,
datalabels.round = if_else(y.percent == FALSE, 2, 1),
datalabels.fill = "white", size = 2, summarise_function = sum,
stacked = FALSE, stackedpercent = FALSE, reverse = TRUE,
legend.position = "top", legend.title = "", print = FALSE,
font.family = "Calibri", text.factor = 1,
format.NL = Sys.isdecimalcomma(), x.lbl = NA, ...)
plot2.line(data = NA, x = NA, y = NA, y.category = NA,
x.category = NA, x.title = NA, y.title = NA, title = NA,
subtitle = "", caption = "", tag = "", title_maxlength = 60,
subtitle_maxlength = 60, na.replace = "(onbekend)", na.rm = FALSE,
x.category.fill = NA, x.category.position = "top",
x.category.bold = TRUE, x.category.size = 10,
x.category.repeat.lbls.x = TRUE, x.category.repeat.lbls.y = TRUE,
x.category.drop = FALSE, x.category.nrow = NA,
x.category.margin = 3.5, x.category.relative = FALSE,
x.date_breaks = "1 month", x.date_labels = "mmm",
y.category.focus = NULL, colours = getOption("plot2.colours",
"certe"), x.lbl.angle = 0, x.lbl.align = NA, x.lbl.italic = FALSE,
x.position = "bottom", x.remove = FALSE, x.max = NA,
x.max.txt = "(rest, x %n)", y.remove = FALSE, y.24h = FALSE,
y.age = FALSE, y.percent = FALSE, y.percent.break = 10,
y.scale = NA, y.position = "left", sort.x = TRUE,
sort.y.category = TRUE, sort.x.category = TRUE, datalabels = TRUE,
datalabels.round = if_else(y.percent == FALSE, 2, 1),
datalabels.fill = "white", summarise_function = sum,
smooth = FALSE, size = 0.75, legend.position = "top",
legend.title = "", print = FALSE, font.family = "Calibri",
text.factor = 1, format.NL = Sys.isdecimalcomma(), x.lbl = NA, ...)
plot2.path(data = NA, x = NA, y = NA, y.category = NA,
x.category = NA, x.title = NA, y.title = NA, title = NA,
subtitle = "", caption = "", tag = "", title_maxlength = 60,
subtitle_maxlength = 60, na.replace = "(onbekend)", na.rm = FALSE,
x.category.fill = NA, x.category.position = "top",
x.category.bold = TRUE, x.category.size = 10,
x.category.repeat.lbls.x = TRUE, x.category.repeat.lbls.y = TRUE,
x.category.drop = FALSE, x.category.nrow = NA,
x.category.margin = 3.5, x.category.relative = FALSE,
x.date_breaks = "1 month", x.date_labels = "mmm",
y.category.focus = NULL, colours = getOption("plot2.colours",
"certe"), x.lbl.angle = 0, x.lbl.align = NA, x.lbl.italic = FALSE,
x.position = "bottom", x.remove = FALSE, x.max = NA,
x.max.txt = "(rest, x %n)", y.remove = FALSE, y.24h = FALSE,
y.age = FALSE, y.percent = FALSE, y.percent.break = 10,
y.scale = NA, y.position = "left", sort.x = TRUE,
sort.y.category = TRUE, sort.x.category = TRUE, datalabels = TRUE,
datalabels.round = if_else(y.percent == FALSE, 2, 1),
datalabels.fill = "white", summarise_function = sum,
smooth = FALSE, size = 0.75, legend.position = "top",
legend.title = "", print = FALSE, font.family = "Calibri",
text.factor = 1, format.NL = Sys.isdecimalcomma(), x.lbl = NA, ...)
plot2.point(data = NA, x = NA, y = NA, y.category = NA,
x.category = NA, x.title = NA, y.title = NA, title = NA,
subtitle = "", caption = "", tag = "", title_maxlength = 60,
subtitle_maxlength = 60, na.replace = "(onbekend)", na.rm = FALSE,
x.category.fill = NA, x.category.position = "top",
x.category.bold = TRUE, x.category.size = 10,
x.category.repeat.lbls.x = TRUE, x.category.repeat.lbls.y = TRUE,
x.category.drop = FALSE, x.category.nrow = NA,
x.category.margin = 3.5, x.category.relative = FALSE,
x.date_breaks = "1 month", x.date_labels = "mmm",
y.category.focus = NULL, colours = getOption("plot2.colours",
"certe"), x.lbl.angle = 0, x.lbl.align = NA, x.lbl.italic = FALSE,
x.position = "bottom", x.remove = FALSE, x.max = NA,
x.max.txt = "(rest, x %n)", y.remove = FALSE, y.24h = FALSE,
y.age = FALSE, y.percent = FALSE, y.percent.break = 10,
y.scale = NA, y.position = "left", sort.x = TRUE,
sort.y.category = TRUE, sort.x.category = TRUE, datalabels = TRUE,
datalabels.round = if_else(y.percent == FALSE, 2, 1),
datalabels.fill = "white", summarise_function = sum, size = 2,
legend.position = "top", legend.title = "", print = FALSE,
font.family = "Calibri", text.factor = 1,
format.NL = Sys.isdecimalcomma(), x.lbl = NA, ...)
plot2.mic(data = NA, y = NA, x = NA, x.title = "MIC-waarde",
y.title = "Aantal", title = "Overzicht MIC-waarden", subtitle = NA,
break.S = NA, break.R = break.S, ...)
plot2.rsi(data = NA, x = NA, y.category = "interpretatie",
x.category = NA, x.title = NA, y.title = NA, fun = portion_df,
translate_ab = "trivial_nl", minimum = 30,
title = "Gevoeligheidsanalyse", subtitle = "", caption = "",
tag = "", title_maxlength = 60, subtitle_maxlength = 60,
na.replace = "(onbekend)", na.rm = FALSE, x.category.fill = NA,
x.category.position = "top", x.category.bold = TRUE,
x.category.size = 10, x.category.repeat.lbls.x = TRUE,
x.category.repeat.lbls.y = TRUE, x.category.drop = FALSE,
x.category.nrow = 1, x.category.margin = 3.5,
x.category.relative = FALSE, colours = "certe_rsi",
x.lbl.angle = 0, x.lbl.align = NA, x.lbl.italic = FALSE,
x.position = "bottom", x.remove = FALSE, x.max = NA,
x.max.txt = "(rest, x %n)", y.remove = FALSE, y.24h = FALSE,
y.age = FALSE, y.percent = FALSE, y.percent.break = 10,
y.scale = NA, y.position = "left", sort.x = TRUE,
sort.y.category = TRUE, sort.x.category = TRUE, datalabels = TRUE,
datalabels.round = 1, datalabels.fill = "white",
summarise_function = sum, stacked = FALSE, stackedpercent = TRUE,
reverse = FALSE, legend.position = "right", legend.title = "",
print = FALSE, font.family = "Calibri", text.factor = 1,
format.NL = Sys.isdecimalcomma(), x.lbl = NA, ...)
plot2.boxplot(data = NA, x = NA, y = NA, x.title = NA,
y.title = NA, x.category = NA, title = NA, subtitle = "",
caption = "", tag = "", title_maxlength = 60,
subtitle_maxlength = 60, na.replace = "(onbekend)", na.rm = FALSE,
x.category.fill = NA, x.category.position = "top",
x.category.bold = TRUE, x.category.size = 10,
x.category.repeat.lbls.x = TRUE, x.category.repeat.lbls.y = TRUE,
x.category.drop = FALSE, x.category.nrow = NA,
x.category.margin = 3.5, x.category.relative = FALSE,
x.date_breaks = "1 month", x.date_labels = "mmm",
y.category.focus = NULL, colours = getOption("plot2.colours",
"certe"), x.lbl.angle = 0, x.lbl.align = NA, x.lbl.italic = FALSE,
x.position = "bottom", x.remove = FALSE, x.max = NA,
x.max.txt = "(rest, x %n)", y.remove = FALSE, y.24h = FALSE,
y.age = FALSE, y.percent = FALSE, y.percent.break = 10,
y.scale = NA, y.position = "left", datalabels = TRUE,
horizontal = FALSE, show.mean = FALSE, legend.position = "top",
legend.title = "", print = FALSE, size = 2, width = NULL,
font.family = "Calibri", text.factor = 1,
format.NL = Sys.isdecimalcomma(), x.lbl = NA, ...)
plot2.density(y, x.title = "Waarde", y.title = "Dichtheid",
y.percent = TRUE, ...)
plot2.frequency(y, x.title = "", y.title = "Aantal", bins = NULL,
...)
plot2.histogram(y, x.title = "", y.title = "Aantal", bins = NULL,
...)
plot2.calendar(data = NULL, x = NULL, y = NULL, title = NULL,
subtitle = NULL, x.title = "Week in de maand", y.title = "Weekdag",
caption = "", tag = "", na.replace = "grey98",
x.category.fill = NA, x.category.position = "top",
x.category.bold = TRUE, x.category.size = 10,
x.category.repeat.lbls.x = FALSE, x.category.repeat.lbls.y = FALSE,
x.category.margin = 3.5, legend.position = "right",
legend.title = "", colours = c("grey85", "certeblauw"),
certe_theme = TRUE, font.family = "Calibri", text.factor = 1,
print = TRUE, ...)
|
data |
|
x |
Standaard is eerste kolom van |
y |
Standaard is tweede of derde kolom van |
y.category |
Standaard is tweede kolom van |
x.category |
Standaard is |
type |
Standaard is |
x.title, y.title |
Standaard is de kolomnaam van |
title |
Standaard is |
subtitle |
Standaard is leeg. Ondertitel van de grafiek. Tekst tussen *enkele sterren* of _underscores_ wordt cursief gemaakt, tekst tussen **dubbele sterren** wordt vet gemaakt. De teksten |
caption |
Standaard is leeg. Bijschrift van de grafiek. Gebruik |
tag |
Standaard is leeg. Bovenschrift van de grafiek. Dit komt links bovenin de grafiek, is vetgedrukt en groter dan de titel. |
title_maxlength |
Standaard is |
subtitle_maxlength |
Standaard is |
na.replace |
Standaard is |
na.rm |
Standaard is |
x.category.fill |
Standaard is |
x.category.position |
Standaard is |
x.category.bold |
Standaard is |
x.category.size |
Standaard is |
x.category.repeat.lbls.x |
Standaard is |
x.category.repeat.lbls.y |
Standaard is |
x.category.drop |
Standaard is |
x.category.nrow |
Standaard is leeg, waardoor het automatisch wordt bepaald door |
x.category.margin |
Standaard is 3.5. Marge van de tekst van |
x.category.relative |
Standaard is |
x.date_breaks |
Standaard is |
x.date_labels |
Standaard is |
y.category.focus |
Standaard is leeg. Een waarde die voorkomt in |
colours |
Standaard is |
x.lbl.angle |
Standaard is |
x.lbl.align |
Standaard is |
x.lbl.italic |
Standaard is |
x.remove |
Standaard is |
x.position |
Standaard is |
x.max |
Standaard is |
x.max.txt |
Standaard is |
y.remove |
Standaard is |
y.24h |
Standaard is |
y.age |
Standaard is |
y.percent |
Standaard is |
y.percent.break |
Standaard is |
y.scale |
Standaard is automatisch. Hiermee kan de schaal van de y-as aangepast worden, met bijvoorbeeld |
y.position |
Standaard is |
sort.x, sort.y.category, sort.x.category |
Standaard is |
datalabels |
Standaard is |
datalabels.round |
Standaard is |
datalabels.fill |
Standaard is |
summarise_function |
Standaard is |
stacked |
Standaard is |
stackedpercent |
Standaard is |
horizontal |
Standaard is |
reverse |
Standaard is |
smooth |
Standaard is |
size |
Standaard is |
bins |
Standaard is |
width |
Standaard is automatisch. De breedte van kolommen en dergelijke. |
show.mean |
Standaard is |
break.S |
Standaard is |
break.R |
Standaard is |
legend.position |
Standaard is |
legend.title |
Standaard is |
print |
Standaard is |
font.family |
Standaard is |
text.factor |
Standaard is |
format.NL |
Standaard is |
misses.data, misses.x, misses.y, misses.y.category, certe_theme |
Wordt alleen intern gebruikt. |
... |
Parameters voor oudere versies, die intern vertaald worden. |
fun |
Standaard is |
translate_ab |
Standaard is |
minimum |
Standaard is |
Een ggplot
-model.
plot2.save
om een grafiek direct op te slaan.
plot2.map_old
om een prevalentiegrafiek met Google Maps te maken.
plot2.map
om een GIS-data te gebruiken voor ruimtelijke analyse.
plot2.pie
om een taartgrafiek te maken.
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 | ## Not run:
plot2.column(mmb.orders, 'jaar', 'aantal orders')
# Direct vanuit dplyr:
df %>%
group_by(jaar, specialisme) %>%
summarise(aantal = n()) %>%
plot2(type = "column")
# Legenda gedefinieerde namen geven:
df %>%
filter(...) %>%
group_by(...) %>%
summarise(aantal = n()
monsters = n_distinct(ordernr)) %>%
plot2(y = c('Aantal orders' = 'aantal',
'Aantal monsters' = 'monsters'),
title = 'Aanvragen in 2018',
type = 'c')
# Gevoeligheidsanalyse, maakt gebruik van AMR::portion_df
# kolommen `interpretatie`, `ab` en `waarde` worden hierdoor standaard gemaakt.
septic_patients %>%
select(hospital_id, amox, fosf, nitr, cipr) %>%
plot2.rsi(x = hospital_id, x.category = ab)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.