Convenience function for plotting univariate data. Method dispatch ensures correct plotting of factor, integer, numeric, and logical vectors.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | plot_univariate(x, ...)
## S4 method for signature 'annotated_numeric'
plot_univariate(x, ...)
## S4 method for signature 'annotated_integer'
plot_univariate(x, main = "",
ylab = "H<c3><a4>ufigkeit", freq = TRUE, ...)
## S4 method for signature 'annotated_factor'
plot_univariate(x, main = "",
ylab = "H<c3><a4>ufigkeit", freq = TRUE, ...)
## S4 method for signature 'annotated_logical'
plot_univariate(x, main = "",
ylab = "H<c3><a4>ufigkeit", freq = TRUE, ...)
|
1 2 3 4 5 6 7 | annotation <- new("vector_annotation", label = "Test Label", unit = "Category")
int_ <- new("annotated_integer", .Data = (-5:4)[-3], annotation = annotation, label = "Test Label")
fac_ <- new("annotated_factor", .Data = 1:4, levels = letters[1:14], annotation = annotation, label = "Test Label")
plot_univariate(int_)
plot_univariate(fac_)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.