Type: | Package |
Version: | 0.2.7 |
Title: | A Graphical EDA Tool |
Description: | An automated graphical exploratory data analysis (EDA) tool that introduces: a.) wideplot graphics for exploring the structure of a dataset through a grid of variables and graphic types. b.) longplot graphics, which present the entire catalog of available graphics for representing a particular variable using a grid of graphic types and variations on these types. c.) plotup function, which presents a particular graphic for a specific variable of a dataset. The plotup() function also makes it possible to obtain the code used to generate the graphic, meaning that the user can adjust its properties as needed. d.) matrixplot graphics that is a grid of a particular graphic showing bivariate relationships between all pairs of variables of a certain(s) type(s) in a multivariate data set. |
License: | GPL-3 |
Encoding: | UTF-8 |
LazyData: | false |
Imports: | ggplot2, gridExtra, rmarkdown, glue, pander, lubridate, tibble, sm, RColorBrewer, forcats, GGally, patchwork, scales |
Suggests: | knitr, MASS, hexbin, testthat (≥ 2.1.0) |
VignetteBuilder: | knitr |
RoxygenNote: | 7.1.1 |
SystemRequirements: | Pandoc (>= 1.12.3), web browser |
URL: | https://sciencegraph.github.io/brinton/, https://github.com/sciencegraph/brinton |
BugReports: | https://github.com/sciencegraph/brinton/issues |
NeedsCompilation: | no |
Packaged: | 2022-12-29 21:44:48 UTC; pmillan |
Author: | Pere Millán-Martínez [aut, cre], Ramon Oller Piqué [ctb] |
Maintainer: | Pere Millán-Martínez <info@sciencegraph.org> |
Repository: | CRAN |
Date/Publication: | 2023-01-07 14:00:10 UTC |
Displays a longplot in a html file.
Description
A longplot is a range of suitable graphics that represent the relationship within the values of one, or a limited number, of variables in a dataset. Each graphic relates the values of all the selected variables and eventually the row number in which they appear.
Usage
longplot(data, vars, label = TRUE, dir = tempdir())
Arguments
data |
Data.frame. Default dataset to use for plot. If not already a data.frame, it should be first coerced to by [as.data.frame()]. |
vars |
Character. A specific variable within the dataset. |
label |
Logical. If 'TRUE' the output includes labels that show the names of the graphics that are being displayed. |
dir |
Directory in which the files are stored. |
Details
In order to present the range of graphics, the user must define a dataset and select at least one variable whitin it. Future work will include graphics that can combine up to three variables.
Value
Cause the side-effect of creating and displaying a temporary html file that includes a range of graphics suitable for this particular combination of variables.
See Also
Specimens of grphics for univariate and bivariate data.
Examples
if (interactive()) {
longplot(esoph, "tobgp")
}
Displays a matrixplot of a particular type of graphic from those included in the specimen for bivariate data in a html file.
Description
A matrixplot is a grid of a particular type of graphic showing bivariate relationships between all pairs of variables of a certain(s) type(s) in a multivariate data set.
Usage
matrixplot(data, dataclass = NULL, diagram = NULL, dir = tempdir())
Arguments
data |
Data.frame. Default dataset to use for plot. Unquoted. If not already a data.frame, it should be first coerced to by as.data.frame(). |
dataclass |
Character vector. The types of data to be considered among the following:
|
diagram |
Character. A specific graphic to be presented within the ones considered in the 2 input variables specimen available at https://sciencegraph.github.io/brinton/articles/specimen2.html. |
dir |
Directory in which the files are stored. |
Value
Cause the side-effect of creating and displaying a temporary html file that includes a grid of graphics. The variables of a dataset are first grouped by the type of data, then, the variables matching the classes specified in the dataclass parameter, are represented in each row and/or column of the matrix.
See Also
Specimen for bivariate data.
Examples
if (interactive()) {
matrixplot(iris, dataclass = c("numeric","numeric"),
diagram="bw contour plot with data points")
}
Returns a ggplot object of a specific graphic explicitly called by name from the ones included in the specimens
Description
Returns a ggplot object of a specific graphic explicitly called by name from the ones included in the specimens
Usage
plotup(data, vars, diagram, output = "plots pane", dir = tempdir())
Arguments
data |
Data.frame. Default dataset to use for plot. If not already a data.frame, it should be first coerced to by [as.data.frame()]. |
vars |
Character. A variable within the dataset. |
diagram |
Character. A specific graphic to be presented within the ones considered by the 'logical', 'ordered', 'factor', 'character', 'datetime' and 'numeric' arguments of the 'wideplot()' function. |
output |
Character. Type of output.
|
dir |
Directory in which the files are stored. |
Value
This function returns a c('gg', 'ggplot') object, but if the 'output' argument is set to it 'html' or 'console', the function cause a side-effect: either creating and displaying a temporary html file, or printing the ggplot2 code to the console.
See Also
Specimens of graphics for univariate and bivariate data.
Examples
plotup(iris, "Petal.Width", "color heatmap")
plotup(iris, "Petal.Width", "color heatmap", output = "console")
if (interactive()) {
plotup(iris, "Petal.Width", "color heatmap", output = "html")
}
Displays a wideplot in a html file.
Description
A wideplot is a grid of graphics where the graphics within each row corresponds to graphical representations of each one of the variables considered within a given dataset. The types of variables and the types of graphics are limited to those included in the specimen of graphics that require one input variable.
Usage
wideplot(
data,
dataclass = NULL,
logical = NULL,
ordered = NULL,
factor = NULL,
character = NULL,
datetime = NULL,
numeric = NULL,
group = NULL,
ncol = 7,
label = "FALSE",
dir = tempdir()
)
Arguments
data |
Data.frame. Default dataset to use for plot. Unquoted. If not already a data.frame, it should be first coerced to by as.data.frame(). |
dataclass |
Character vector. The types of data to be considered among the following:
|
logical |
Character vector. Graphics for logical variables among the following:
|
ordered |
Character vector. Graphics for ordered factor variables among the following:
|
factor |
Character vector. Graphics for Character variables among the following:
|
character |
Character vector. Graphics for character variables among the following:
|
datetime |
Character vector. Graphics for datetime variables among the following:
|
numeric |
Character vector. Graphics for numeric variables among the following:
|
group |
Quoted character. Group of prestablished graphics which marks represent:
|
ncol |
Numeric. Number of columns. An integer between 3 and 7. The fewer columns displayed, the larger the size of the resulting graphics, a feature that is especially useful if the scale labels dwarf the graphics area. |
label |
Logical. If 'TRUE' the output includes labels that show the names of the graphics that are being displayed. |
dir |
Directory in which the files are stored. |
Value
Cause the side-effect of creating and displaying a temporary html file that includes a grid of graphics. The variables of a dataset are first grouped by the type of data, then, each variable is graphically represented into a range of different graphics in one row of the matrix.
See Also
Specimen for univariate data.
Examples
if (interactive()) {
wideplot(sleep, dataclass = c("factor"),
factor=c("point graph", "line graph", "tile plot"),
numeric = c("point graph", "line graph", "stepped line graph"))
}