plot2: Grafiek van tabel of reeks

Description Usage Arguments Value See Also Examples

View source: R/plot2.R

Description

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.

Usage

  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, ...)

Arguments

data

data.frame met gegevens.

x

Standaard is eerste kolom van data. Naam van kolom (als tekst) met gegevens voor de x-as. Wanneer in deze kolom waarden meerdere keren voorkomen, worden daarvan de waarden van y bij elkaar opgeteld.

y

Standaard is tweede of derde kolom van data. Naam van kolom (als tekst) met gegevens voor de y-as. Het is ook mogelijk om hier namen aan te geven, om de tekst in de legenda aan te passen; zie voorbeelden. Niet-numerieke waarden worden getransformeerd met as.double.

y.category

Standaard is tweede kolom van data. Naam van kolom (als tekst) met gegevens voor de y-as.

x.category

Standaard is NA. Splitsen in verschillende plots door middel van facet_wrap(scales = "free"). Zie aldaar voor meer parameters.

type

Standaard is "column", in tegenstelling tot de standaard type = "p" van plot. Geldige opties zijn "bar" ("b"), "barpercent", "boxplot" ("box"), "column" ("c", "col"), "density" ("d", "dens"), "frequency" ("f", "freq"), "histogram" ("h", "hist"), "line" ("l"), "lollipop", "point" ("p"), "rsi" en "mic".

x.title, y.title

Standaard is de kolomnaam van x of y. Beschrijving van de x- en y-as. Laat deze ongedefinieerd om de kolomtitels van de data te gebruiken. Tekst tussen *enkele sterren* of _underscores_ wordt cursief gemaakt, tekst tussen **dubbele sterren** wordt vet gemaakt.

title

Standaard is NA, waarmee de asnamen van y en x weergegeven worden als "y per x". Titel van de grafiek. Tekst tussen *enkele sterren* of _underscores_ wordt cursief gemaakt, tekst tussen **dubbele sterren** wordt vet gemaakt. De teksten n() en n_distinct(kolomnaam) worden vertaald.

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 n() en n_distinct(kolomnaam) worden vertaald.

caption

Standaard is leeg. Bijschrift van de grafiek. Gebruik caption = ID() om een ID te maken van standaard 6 tekens.

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 60. Maximale aantal tekens op een regel.

subtitle_maxlength

Standaard is 60. Maximale aantal tekens op een regel.

na.replace

Standaard is "(onbekend)". De tekst die geplaatst wordt in plaats van NA in de variabelen x, x.category en y.category. In geval van plot2.calendar is dit de kleur die gegeven wordt aan dagen met missende informatie.

na.rm

Standaard is FALSE. Verwijderen van alle NA's in de variabelen x, y, x.category en y.category.

x.category.fill

Standaard is NA; doorzichtig. Kleur die doorgegeven wordt aan colourpicker.

x.category.position

Standaard is "top". Geldige opties zijn "left", "right", "top", "bottom".

x.category.bold

Standaard is TRUE. Tekst van x.category vetgedrukt weergeven.

x.category.size

Standaard is 10 pt. Grootte van de 'titel' bij elke grafiek.

x.category.repeat.lbls.x

Standaard is TRUE. Herhalen van de x-aslabels bij elke deelgrafiex.

x.category.repeat.lbls.y

Standaard is TRUE. Herhalen van de y-aslabels bij elke deelgrafiek.

x.category.drop

Standaard is FALSE. Verwijderen van factor levels die niet voorkomen in de data.

x.category.nrow

Standaard is leeg, waardoor het automatisch wordt bepaald door link[ggplot2]{facet_wrap}. Aantal rijen met grafieken.

x.category.margin

Standaard is 3.5. Marge van de tekst van x.category.

x.category.relative

Standaard is FALSE. Hiermee wordt de breedte van grafieken afgestemd op de beschikbare waarden van de x-as.

x.date_breaks

Standaard is "1 month". Datumafstand op x-as, zoals "2 weeks" of "10 years".

x.date_labels

Standaard is "mmm". Datumlabels op x-as. Wordt geëvalueerd met date_generic, dus ondersteunt ook "d mmmm yyyy".

y.category.focus

Standaard is leeg. Een waarde die voorkomt in data$y.category om te benadrukken. De andere waarden in data$y.category worden grijs gemaakt, en de benadrukte kleur is het eerste element van colours.

colours

Standaard is "certe". De standaard optie kan ook ingesteld worden met options(plot2.colours = "gekozen_kleuren"). Een tekst of vector van tekst die doorgegeven wordt aan colourpicker.

x.lbl.angle

Standaard is 0. De hoek in graden waaronder de labels van de x-as weergegeven worden. Gebruik voor verticale weergave een hoek van 90 (richting onder naar boven) of 270 (richting boven naar onder).

x.lbl.align

Standaard is NA, waardoor het uitlijnen berekend wordt op basis van x.lbl.angle. Andere geldige opties zijn "left", "center" en "right". Deze kunnen afgekort worden.

x.lbl.italic

Standaard is FALSE. De categorieën van de x-as cursief maken. Dit is nodig bij namen van micro-organismen.

x.remove

Standaard is FALSE. De eenheden van x-as verwijderen. Om de tekst (label) van de x-as te verwijderen, gebruik x.title = "".

x.position

Standaard is "bottom". Geldige opties zijn "left", "right", "top", "bottom". Verplaatst de astitel en de astekst.

x.max

Standaard is 10 bij plot2.barpercent en NA bij de rest. Maximaal aantal verschillende waarden op de x-as.

x.max.txt

Standaard is "(rest, x %n)". Tekst die weergegeven wordt bij waarden op de x-as die buiten x.max vallen. Gebruik "%n" om het aantal overige categorieën weer te geven.

y.remove

Standaard is FALSE. De eenheden van y-as verwijderen. Om de tekst (label) van de y-as te verwijderen, gebruik y.title = "".

y.24h

Standaard is FALSE. De primaire lijnen van de y-as per 24 uur weergeven.

y.age

Standaard is FALSE. De primaire lijnen van de y-as per leeftijdsgroep weergeven (zie age.group).

y.percent

Standaard is FALSE. Toont de y-as als percentage.

y.percent.break

Standaard is 10. Labels worden geplaatst op elke y.percent.break procent.

y.scale

Standaard is automatisch. Hiermee kan de schaal van de y-as aangepast worden, met bijvoorbeeld y.scale = c(0, 25). Standaard wordt in tegenstelling tot ggplot wordt altijd y = 0 weergegeven. De hoogste waarde op de y-as is standaard 1,25x de hoogst voorkomende y-waarde en de laagste waarde op de y-as is standaard 0 (of 1,25x de laagst voorkomende y-waarde wanneer dit lager is dan 0).

y.position

Standaard is "left", behalve bij type = "barpercent". Geldige opties zijn "left", "right", "top", "bottom". Verplaatst de astitel en de astekst.

sort.x, sort.y.category, sort.x.category

Standaard is TRUE. Sorteren van de x en/of y.category en/of x.category door deze te transformeren naar een geordende factor. Geldige waarden zijn:
- TRUE, bij factors op levels sorteren, anders zoals "asc" sorteren.
- FALSE, zoals volgorde in de data voortkomt sorteren.
- NULL, helemaal niet sorteren/transformeren
- "asc" of "alpha", oplopend alfabetisch sorteren; ascending.
- "desc", aflopend alfabetisch sorteren; descending.
- "order", zoals FALSE sorteren.
- "freq", aflopend volgens de frequentie (summarise_function) van y sorteren (hoogste waarde eerst).
- "freq-asc", oplopend zoals "freq" sorteren (laagste waarde eerst).

datalabels

Standaard is TRUE, wat de waarden weergeeft van y. Geeft datalabels weer bij de kolommen, lijnen of punten. Dit kan een kolomnaam van data zijn, of een lijst met waarden. Gebruik datalabels = FALSE of datalabels = NA om geen datalabels weer te geven.

datalabels.round

Standaard is if_else(y.percent == FALSE, 2, 1). Aantal decimalen waarop datalabels afgerond wordt, wanneer dit (decimale) getallen zijn.

datalabels.fill

Standaard is 'white'. De achtergrondkleur van de labels die doorgegeven wordt aan colourpicker. Gebruik datalabels.fill = NA om geen achtergrond weer te geven.

summarise_function

Standaard is sum. De functie die gebruikt wordt voor link{summarise} om de waarden van y te berekenen wanneer waarden van x vaker voorkomen. Kan ook uit een ander pakket komen: plot2(summarise_function = base::mean).

stacked

Standaard is FALSE. Met FALSE worden de kolommen naast elkaar geplaatst, in plaats van op elkaar.

stackedpercent

Standaard is FALSE. Hiermee kan een 100% gestapelde grafiek gemaakt worden.

horizontal

Standaard is FALSE. Horizontale orientatie van de kolommen. Met TRUE worden er horizontale balken weergegeven.

reverse

Standaard is horizontal, waardoor de waarde van horizontal overgenomen wordt. Hiermee worden gestapelde balken omgekeerd. Dit is soms nodig om de legenda synchroon te houden met de kleuren van de balken. Kan ook TRUE of FALSE zijn.

smooth

Standaard is FALSE. Lijnen vloeiend weergeven.

size

Standaard is if_else(type == "line", 0.75, 2). Dikte van de lijnen in geval van een lijngrafiek en punten in geval van een puntgrafiek.

bins

Standaard is 20 of, wanneer dit lager is, het unieke aantal waarden gedeeld door 3. Bij een histogram het aantal 'bins'.

width

Standaard is automatisch. De breedte van kolommen en dergelijke.

show.mean

Standaard is FALSE. Bij boxplots de gemiddelde lijn ook weergeven.

break.S

Standaard is NA. De hoogste MIC die geïnterpreteerd wordt als S.

break.R

Standaard is break.S. De laagste MIC die geïnterpreteerd wordt als R.

legend.position

Standaard is "top". Geldige opties zijn "none" ("geen"), "left" ("links"), "right" ("rechts"), "top" ("boven"), "bottom" ("onder"), of een vector met 2 cijfers: bijv. legend.position = c(0, 0) voor linksonder of legend.position = c(1, 1) voor rechtsboven.

legend.title

Standaard is "". Titel van de legenda.

print

Standaard is FALSE. Hiermee wordt de grafiek direct met print weergegeven. Met FALSE kan de output gebruikt worden om door te geven aan een variabele.

font.family

Standaard is "Calibri". Het lettertype dat gebruikt moet worden voor tekst in de grafiek. Om alle lettertypen te kunnen gebruiken die momenteel in Windows geïnstalleerd zijn, moet de functie install.fonts eerst eenmalig gebruikt worden.

text.factor

Standaard is 1. Factor van de grootte van alle tekst.

format.NL

Standaard is Sys.isdecimalcomma(), zie Sys.isdecimalcomma. Getallen Nederlands weergeven, met een komma als decimaal scheidingsteken.

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 portion_df. Functie die gebruikt wordt om data te transformeren voor plot2.rsi. Geldige opties zijn portion_df en count_df.

translate_ab

Standaard is "trivial_nl", zie portion_df.

minimum

Standaard is 30, zie portion_df.

Value

Een ggplot-model.

See Also

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.

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
## 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)

msberends/certedata documentation built on Nov. 26, 2019, 5:19 a.m.