| Title: | A Better Way To Explore What Is Best |
|---|---|
| Description: | bettr provides a set of interactive visualization methods to explore the results of a benchmarking study, where typically more than a single performance measures are computed. The user can weight the performance measures according to their preferences. Performance measures can also be grouped and aggregated according to additional annotations. |
| Authors: | Federico Marini [aut] (ORCID: <https://orcid.org/0000-0003-3252-7758>), Charlotte Soneson [aut, cre] (ORCID: <https://orcid.org/0000-0003-3833-2169>), Daniel Incicau [aut] (ORCID: <https://orcid.org/0009-0001-1748-6145>) |
| Maintainer: | Charlotte Soneson <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.9.0 |
| Built: | 2026-05-11 09:59:22 UTC |
| Source: | https://github.com/bioc/bettr |
Assemble all bettr input into a SummarizedExperiment object. This
has the advantage of keeping all data together in a single object, and can
be used as input to bettr or bettrGetReady, instead of
providing the individual components.
assembleSE( df, idCol = "Method", metrics = setdiff(colnames(df), idCol), initialWeights = NULL, initialTransforms = list(), metricInfo = NULL, metricColors = NULL, idInfo = NULL, idColors = NULL )assembleSE( df, idCol = "Method", metrics = setdiff(colnames(df), idCol), initialWeights = NULL, initialTransforms = list(), metricInfo = NULL, metricColors = NULL, idInfo = NULL, idColors = NULL )
df |
A |
idCol |
Character scalar, indicating the name of the column of |
metrics |
Character vector, indicating which of the
columns of |
initialWeights |
Named numeric vector providing initial weights for
each metric to use for aggregating them into a final score. Must contain
one entry per metric included in |
initialTransforms |
Named list with initial values of transformation parameters for each metric. Each list entry should correspond to one metric, and take the form of a list with up to four elements, named: * **flip**: Logical scalar; whether or not to flip the sign of the
metric values. Defaults to `FALSE`.
* **offset**: Numeric scalar; offset to add to the (flipped)
metric values. Defaults to `0`.
* **transform**: Character scalar; one of 'None', 'z-score',
'\[0,1\]', '\[-1,1\]', 'Rank', 'Rank+\[0,1\]' or 'z-score+\[0,1\]',
indicating which transform to apply to
the metric values (after any flipping and/or adding the offset).
Defaults to 'None'.
* **cuts**: Numeric vector or `NULL`; the cut points that will
be used to bin the metric values (after the other transformations).
Defaults to `NULL`.
Only values deviating from the defaults need to be explicitly specified,
the others will be initialized to their default values.
|
metricInfo |
|
metricColors |
Named list with colors used for columns of
|
idInfo |
|
idColors |
Named list with colors used for columns of |
A SummarizedExperiment object with rows corresponding to methods and columns corresponding to metrics.
Charlotte Soneson
df <- data.frame(Method = c("M1", "M2", "M3"), metric1 = c(1, 2, 3), metric2 = c(3, 1, 2)) metricInfo <- data.frame(Metric = c("metric1", "metric2", "metric3"), Group = c("G1", "G2", "G2")) idInfo <- data.frame(Method = c("M1", "M2", "M3"), Type = c("T1", "T1", "T2")) bettrSE <- assembleSE(df = df, metricInfo = metricInfo, idInfo = idInfo)df <- data.frame(Method = c("M1", "M2", "M3"), metric1 = c(1, 2, 3), metric2 = c(3, 1, 2)) metricInfo <- data.frame(Metric = c("metric1", "metric2", "metric3"), Group = c("G1", "G2", "G2")) idInfo <- data.frame(Method = c("M1", "M2", "M3"), Type = c("T1", "T1", "T2")) bettrSE <- assembleSE(df = df, metricInfo = metricInfo, idInfo = idInfo)
Launch bettr app to explore and aggregate performance metrics
bettr( df = NULL, idCol = "Method", metrics = if (!is.null(df)) setdiff(colnames(df), idCol) else NULL, initialWeights = NULL, initialTransforms = list(), metricInfo = NULL, metricColors = NULL, idInfo = NULL, idColors = NULL, weightResolution = 0.05, bstheme = "darkly", appTitle = "bettr", bettrSE = NULL, addStopButton = TRUE, defaultWeight = 0.2, serverMode = FALSE, cacheVersion = NULL )bettr( df = NULL, idCol = "Method", metrics = if (!is.null(df)) setdiff(colnames(df), idCol) else NULL, initialWeights = NULL, initialTransforms = list(), metricInfo = NULL, metricColors = NULL, idInfo = NULL, idColors = NULL, weightResolution = 0.05, bstheme = "darkly", appTitle = "bettr", bettrSE = NULL, addStopButton = TRUE, defaultWeight = 0.2, serverMode = FALSE, cacheVersion = NULL )
df |
A |
idCol |
Character scalar, indicating the name of the column of |
metrics |
Character vector, indicating which of the
columns of |
initialWeights |
Named numeric vector providing initial weights for
each metric to use for aggregating them into a final score. Must contain
one entry per metric included in |
initialTransforms |
Named list with initial values of transformation parameters for each metric. Each list entry should correspond to one metric, and take the form of a list with up to four elements, named: * **flip**: Logical scalar; whether or not to flip the sign of the
metric values. Defaults to `FALSE`.
* **offset**: Numeric scalar; offset to add to the (flipped)
metric values. Defaults to `0`.
* **transform**: Character scalar; one of 'None', 'z-score',
'\[0,1\]', '\[-1,1\]', 'Rank', 'Rank+\[0,1\]' or 'z-score+\[0,1\]',
indicating which transform to apply to
the metric values (after any flipping and/or adding the offset).
Defaults to 'None'.
* **cuts**: Numeric vector or `NULL`; the cut points that will
be used to bin the metric values (after the other transformations).
Defaults to `NULL`.
Only values deviating from the defaults need to be explicitly specified,
the others will be initialized to their default values.
|
metricInfo |
|
metricColors |
Named list with colors used for columns of
|
idInfo |
|
idColors |
Named list with colors used for columns of |
weightResolution |
Numeric scalar in (0,1), giving the resolution at which weights can be specified using the sliders in the interface. |
bstheme |
Character scalar giving the bootswatch theme for the app (see https://bootswatch.com/). Default 'darkly'. |
appTitle |
Character scalar giving the title that will be used for the app. Defaults to 'bettr'. |
bettrSE |
A |
addStopButton |
Logical scalar. If |
defaultWeight |
Numeric scalar between 0 and 1, giving the default weight to assign to each metric. |
serverMode |
Logical scalar. If |
cacheVersion |
Character string or |
A shiny application
Charlotte Soneson, Daniel Incicau
df <- data.frame(Method = c("M1", "M2", "M3"), metric1 = c(1, 2, 3), metric2 = c(3, 1, 2), metric3 = factor(c("a", "a", "b"))) initialTransforms <- list(metric1 = list(flip = TRUE, offset = 4)) metricInfo <- data.frame(Metric = c("metric1", "metric2", "metric3"), Group = c("G1", "G2", "G2")) idInfo <- data.frame(Method = c("M1", "M2", "M3"), Type = c("T1", "T1", "T2")) metricColors <- list(Group = c(G1 = "red", G2 = "blue")) if (interactive()) { bettr(df = df, idCol = "Method", metrics = c("metric1", "metric2", "metric3"), initialTransforms = initialTransforms, metricInfo = metricInfo, metricColors = metricColors, idInfo = idInfo) }df <- data.frame(Method = c("M1", "M2", "M3"), metric1 = c(1, 2, 3), metric2 = c(3, 1, 2), metric3 = factor(c("a", "a", "b"))) initialTransforms <- list(metric1 = list(flip = TRUE, offset = 4)) metricInfo <- data.frame(Metric = c("metric1", "metric2", "metric3"), Group = c("G1", "G2", "G2")) idInfo <- data.frame(Method = c("M1", "M2", "M3"), Type = c("T1", "T1", "T2")) metricColors <- list(Group = c(G1 = "red", G2 = "blue")) if (interactive()) { bettr(df = df, idCol = "Method", metrics = c("metric1", "metric2", "metric3"), initialTransforms = initialTransforms, metricInfo = metricInfo, metricColors = metricColors, idInfo = idInfo) }
Import bettr data from a standardized JSON format and create a
SummarizedExperiment object using assembleSE.
bettrFromJSON(file = NULL, json = NULL)bettrFromJSON(file = NULL, json = NULL)
file |
Character scalar, path to the JSON file to import. |
json |
Character scalar, JSON string to parse. If provided, |
A SummarizedExperiment object that can be passed to
bettr.
Daniel Incicau
df <- data.frame(Method = c("M1", "M2", "M3"), metric1 = c(1, 2, 3), metric2 = c(3, 1, 2)) bettrSE <- assembleSE(df = df) json_file <- tempfile(fileext = ".json") bettrToJSON(bettrSE, file = json_file) bettrSE_reload <- bettrFromJSON(file = json_file)df <- data.frame(Method = c("M1", "M2", "M3"), metric1 = c(1, 2, 3), metric2 = c(3, 1, 2)) bettrSE <- assembleSE(df = df) json_file <- tempfile(fileext = ".json") bettrToJSON(bettrSE, file = json_file) bettrSE_reload <- bettrFromJSON(file = json_file)
Prepare input data for plotting with bettr. This function replicates the steps that are performed in the shiny app.
bettrGetReady( df, idCol = "Method", metrics = setdiff(colnames(df), idCol), initialWeights = NULL, initialTransforms = list(), metricInfo = NULL, metricColors = NULL, idInfo = NULL, idColors = NULL, scoreMethod = "weighted mean", idOrdering = "high-to-low", showOnlyTopIds = FALSE, nbrTopIds = 10L, idTopNGrouping = NULL, keepIds = NULL, metricGrouping = NULL, metricCollapseGroup = FALSE, metricCollapseMethod = "mean", defaultWeight = 0.2, bettrSE = NULL )bettrGetReady( df, idCol = "Method", metrics = setdiff(colnames(df), idCol), initialWeights = NULL, initialTransforms = list(), metricInfo = NULL, metricColors = NULL, idInfo = NULL, idColors = NULL, scoreMethod = "weighted mean", idOrdering = "high-to-low", showOnlyTopIds = FALSE, nbrTopIds = 10L, idTopNGrouping = NULL, keepIds = NULL, metricGrouping = NULL, metricCollapseGroup = FALSE, metricCollapseMethod = "mean", defaultWeight = 0.2, bettrSE = NULL )
df |
A |
idCol |
Character scalar, indicating the name of the column of |
metrics |
Character vector, indicating which of the
columns of |
initialWeights |
Named numeric vector providing initial weights for
each metric to use for aggregating them into a final score. Must contain
one entry per metric included in |
initialTransforms |
Named list with initial values of transformation parameters for each metric. Each list entry should correspond to one metric, and take the form of a list with up to four elements, named: * **flip**: Logical scalar; whether or not to flip the sign of the
metric values. Defaults to `FALSE`.
* **offset**: Numeric scalar; offset to add to the (flipped)
metric values. Defaults to `0`.
* **transform**: Character scalar; one of 'None', 'z-score',
'\[0,1\]', '\[-1,1\]', 'Rank', 'Rank+\[0,1\]' or 'z-score+\[0,1\]',
indicating which transform to apply to
the metric values (after any flipping and/or adding the offset).
Defaults to 'None'.
* **cuts**: Numeric vector or `NULL`; the cut points that will
be used to bin the metric values (after the other transformations).
Defaults to `NULL`.
Only values deviating from the defaults need to be explicitly specified,
the others will be initialized to their default values.
|
metricInfo |
|
metricColors |
Named list with colors used for columns of
|
idInfo |
|
idColors |
Named list with colors used for columns of |
scoreMethod |
Character scalar specifying the scoring method, that is,
how to aggregate scores across metrics. Should be one of
|
idOrdering |
Character scalar indicating whether methods should be
ranked with highest aggregated scores on top ( |
showOnlyTopIds |
Logical scalar indicating whether to only retain the top N methods (ranked by the aggregated score). |
nbrTopIds |
If |
idTopNGrouping |
If |
keepIds |
Character vector indicating which methods (a subset of the
values in |
metricGrouping |
A character scalar providing the name of a column in
|
metricCollapseGroup |
A logical scalar indicating whether metric
values should be collapsed within each group defined by
|
metricCollapseMethod |
If |
defaultWeight |
Numeric scalar between 0 and 1, giving the default weight to assign to each metric. |
bettrSE |
A |
A list of objects, which can be directly used as inputs for the bettr plotting functions. See the man page for the respective plotting function for more details.
Charlotte Soneson
## Generate example data df <- data.frame(Method = c("M1", "M2", "M3"), metric1 = c(1, 2, 3), metric2 = c(3, 1, 2)) metricInfo <- data.frame(Metric = c("metric1", "metric2", "metric3"), Group = c("G1", "G2", "G2")) idInfo <- data.frame(Method = c("M1", "M2", "M3"), Type = c("T1", "T1", "T2")) prepData <- bettrGetReady(df = df, idCol = "Method", metricInfo = metricInfo, idInfo = idInfo) prepData <- bettrGetReady(df = df, idCol = "Method", metricInfo = metricInfo, idInfo = idInfo, metricGrouping = "Group", metricCollapseGroup = TRUE)## Generate example data df <- data.frame(Method = c("M1", "M2", "M3"), metric1 = c(1, 2, 3), metric2 = c(3, 1, 2)) metricInfo <- data.frame(Metric = c("metric1", "metric2", "metric3"), Group = c("G1", "G2", "G2")) idInfo <- data.frame(Method = c("M1", "M2", "M3"), Type = c("T1", "T1", "T2")) prepData <- bettrGetReady(df = df, idCol = "Method", metricInfo = metricInfo, idInfo = idInfo) prepData <- bettrGetReady(df = df, idCol = "Method", metricInfo = metricInfo, idInfo = idInfo, metricGrouping = "Group", metricCollapseGroup = TRUE)
Export a bettr SummarizedExperiment object to a standardized JSON format
that can be re-imported using bettrSEFromJSON.
bettrToJSON(bettrSE, file = NULL, pretty = TRUE)bettrToJSON(bettrSE, file = NULL, pretty = TRUE)
bettrSE |
A |
file |
Character scalar, path to the output JSON file. If NULL, returns the JSON string without writing to file. |
pretty |
Logical scalar, whether to format the JSON output with indentation for readability (default: TRUE). |
If file is NULL, returns a JSON string. Otherwise, writes
to file and returns the file path invisibly.
Daniel Incicau
df <- data.frame(Method = c("M1", "M2", "M3"), metric1 = c(1, 2, 3), metric2 = c(3, 1, 2)) bettrSE <- assembleSE(df = df) json_str <- bettrToJSON(bettrSE)df <- data.frame(Method = c("M1", "M2", "M3"), metric1 = c(1, 2, 3), metric2 = c(3, 1, 2)) bettrSE <- assembleSE(df = df) json_str <- bettrToJSON(bettrSE)
Create a bar/polar plot. The input arguments for this functions are
typically generated using bettrGetReady, which ensures that
all required columns are available.
makeBarPolarPlot( bettrList = NULL, plotdata, scoredata, idCol, metricCol = "Metric", valueCol = "ScaledValue", weightCol = "Weight", scoreCol = "Score", metricGroupCol = "metricGroup", metricColors, metricCollapseGroup = FALSE, metricGrouping = "---", methods = NULL, labelSize = 10, showComposition = FALSE, scaleFactorPolars = 1 )makeBarPolarPlot( bettrList = NULL, plotdata, scoredata, idCol, metricCol = "Metric", valueCol = "ScaledValue", weightCol = "Weight", scoreCol = "Score", metricGroupCol = "metricGroup", metricColors, metricCollapseGroup = FALSE, metricGrouping = "---", methods = NULL, labelSize = 10, showComposition = FALSE, scaleFactorPolars = 1 )
bettrList |
A |
plotdata |
A |
scoredata |
A |
idCol |
Character scalar indicating which column of |
metricCol |
Character scalar indicating which column of |
valueCol |
Character scalar indicating which column of |
weightCol |
Character scalar indicating which column of |
scoreCol |
Character scalar indicating which column of |
metricGroupCol |
Character scalar indicating which column of
|
metricColors |
Named list with colors used for the metrics and
any other metric annotations. Typically obtained as
|
metricCollapseGroup |
Logical scalar indicating whether metrics
should be collapsed by the group variable provided by
|
metricGrouping |
Character scalar indicating the column of
|
methods |
Character vector containing the methods for which to make
polar plots. If |
labelSize |
Numeric scalar providing the size of the labels in the plot. |
showComposition |
Logical scalar indicating whether to show the composition of the score in the bar plots. This is only interpretable if the scores are obtained via a weighted mean approach. |
scaleFactorPolars |
Numeric scalar giving the scale factor determining the size of the polar plots. |
A ggplot object.
Charlotte Soneson
## Generate example data df <- data.frame(Method = c("M1", "M2", "M3"), metric1 = c(1, 2, 3), metric2 = c(3, 1, 2)) metricInfo <- data.frame(Metric = c("metric1", "metric2", "metric3"), Group = c("G1", "G2", "G2")) idInfo <- data.frame(Method = c("M1", "M2", "M3"), Type = c("T1", "T1", "T2")) prepData <- bettrGetReady(df = df, idCol = "Method", metricInfo = metricInfo, idInfo = idInfo) makeBarPolarPlot(bettrList = prepData, showComposition = TRUE)## Generate example data df <- data.frame(Method = c("M1", "M2", "M3"), metric1 = c(1, 2, 3), metric2 = c(3, 1, 2)) metricInfo <- data.frame(Metric = c("metric1", "metric2", "metric3"), Group = c("G1", "G2", "G2")) idInfo <- data.frame(Method = c("M1", "M2", "M3"), Type = c("T1", "T1", "T2")) prepData <- bettrGetReady(df = df, idCol = "Method", metricInfo = metricInfo, idInfo = idInfo) makeBarPolarPlot(bettrList = prepData, showComposition = TRUE)
Create a summary heatmap. The input arguments for this functions are
typically generated using bettrGetReady, which ensures that
all required columns are available.
makeHeatmap( bettrList = NULL, plotdata, scoredata, idCol, metricCol = "Metric", valueCol = "ScaledValue", weightCol = "Weight", scoreCol = "Score", metricGroupCol = "metricGroup", metricInfo, metricColors, idInfo, idColors, metricCollapseGroup = FALSE, metricGrouping = "---", labelSize = 10, showRowNames = TRUE, plotType = "Heatmap", rownamewidth_cm = 6, colnameheight_cm = 6 )makeHeatmap( bettrList = NULL, plotdata, scoredata, idCol, metricCol = "Metric", valueCol = "ScaledValue", weightCol = "Weight", scoreCol = "Score", metricGroupCol = "metricGroup", metricInfo, metricColors, idInfo, idColors, metricCollapseGroup = FALSE, metricGrouping = "---", labelSize = 10, showRowNames = TRUE, plotType = "Heatmap", rownamewidth_cm = 6, colnameheight_cm = 6 )
bettrList |
A |
plotdata |
A |
scoredata |
A |
idCol |
Character scalar indicating which column of |
metricCol |
Character scalar indicating which column of |
valueCol |
Character scalar indicating which column of |
weightCol |
Character scalar indicating which column of |
scoreCol |
Character scalar indicating which column of |
metricGroupCol |
Character scalar indicating which column of
|
metricInfo |
|
metricColors |
Named list with colors used for the metrics and
any other metric annotations. Typically obtained as
|
idInfo |
|
idColors |
Named list with colors used for methods and any other
method annotations. Typically obtained as |
metricCollapseGroup |
Logical scalar indicating whether metrics
should be collapsed by the group variable provided by
|
metricGrouping |
Character scalar indicating the column of
|
labelSize |
Numeric scalar providing the size of the labels in the plot. |
showRowNames |
Logical scalar indicating whether to show row (method) names in the heatmap. |
plotType |
Either |
rownamewidth_cm, colnameheight_cm
|
Numeric scalars defining the width of row names and height of column names, in cm. |
A HeatmapList object.
Charlotte Soneson
## Generate example data df <- data.frame(Method = c("M1", "M2", "M3"), metric1 = c(1, 2, 3), metric2 = c(3, 1, 2)) metricInfo <- data.frame(Metric = c("metric1", "metric2", "metric3"), Group = c("G1", "G2", "G2")) idInfo <- data.frame(Method = c("M1", "M2", "M3"), Type = c("T1", "T1", "T2")) prepData <- bettrGetReady(df = df, idCol = "Method", metricInfo = metricInfo, idInfo = idInfo) makeHeatmap(bettrList = prepData, plotType = "Heatmap") makeHeatmap(bettrList = prepData, plotType = "Dot plot")## Generate example data df <- data.frame(Method = c("M1", "M2", "M3"), metric1 = c(1, 2, 3), metric2 = c(3, 1, 2)) metricInfo <- data.frame(Metric = c("metric1", "metric2", "metric3"), Group = c("G1", "G2", "G2")) idInfo <- data.frame(Method = c("M1", "M2", "M3"), Type = c("T1", "T1", "T2")) prepData <- bettrGetReady(df = df, idCol = "Method", metricInfo = metricInfo, idInfo = idInfo) makeHeatmap(bettrList = prepData, plotType = "Heatmap") makeHeatmap(bettrList = prepData, plotType = "Dot plot")
Create a parallel coordinates plot. The input arguments for this functions
are typically generated using bettrGetReady, which ensures
that all required columns are available.
makeParCoordPlot( bettrList = NULL, plotdata, idCol, metricCol = "Metric", valueCol = "ScaledValue", metricGroupCol = "metricGroup", metricColors, idColors, methods = NULL, metricGrouping = "---", highlightMethod = NULL, labelSize = 10 )makeParCoordPlot( bettrList = NULL, plotdata, idCol, metricCol = "Metric", valueCol = "ScaledValue", metricGroupCol = "metricGroup", metricColors, idColors, methods = NULL, metricGrouping = "---", highlightMethod = NULL, labelSize = 10 )
bettrList |
A |
plotdata |
A |
idCol |
Character scalar indicating which column of |
metricCol |
Character scalar indicating which column of |
valueCol |
Character scalar indicating which column of |
metricGroupCol |
Character scalar indicating which column of
|
metricColors |
Named list with colors used for the metrics and
any other metric annotations. Typically obtained as
|
idColors |
Named list with colors used for methods and any other
method annotations. Typically obtained as |
methods |
Character vector containing the methods to include.
If |
metricGrouping |
Character scalar indicating the column of
|
highlightMethod |
Character vector indicating one or more methods that should be highlighted in the plot. |
labelSize |
Numeric scalar providing the size of the labels in the plot. |
A ggplot object.
Charlotte Soneson
## Generate example data df <- data.frame(Method = c("M1", "M2", "M3"), metric1 = c(1, 2, 3), metric2 = c(3, 1, 2)) metricInfo <- data.frame(Metric = c("metric1", "metric2", "metric3"), Group = c("G1", "G2", "G2")) idInfo <- data.frame(Method = c("M1", "M2", "M3"), Type = c("T1", "T1", "T2")) prepData <- bettrGetReady(df = df, idCol = "Method", metricInfo = metricInfo, idInfo = idInfo) makeParCoordPlot(bettrList = prepData, highlightMethod = "M2")## Generate example data df <- data.frame(Method = c("M1", "M2", "M3"), metric1 = c(1, 2, 3), metric2 = c(3, 1, 2)) metricInfo <- data.frame(Metric = c("metric1", "metric2", "metric3"), Group = c("G1", "G2", "G2")) idInfo <- data.frame(Method = c("M1", "M2", "M3"), Type = c("T1", "T1", "T2")) prepData <- bettrGetReady(df = df, idCol = "Method", metricInfo = metricInfo, idInfo = idInfo) makeParCoordPlot(bettrList = prepData, highlightMethod = "M2")
Create a polar plot. The input arguments for this functions are
typically generated using bettrGetReady, which ensures that
all required columns are available.
makePolarPlot( bettrList = NULL, plotdata, idCol, metricCol = "Metric", valueCol = "ScaledValue", metricGroupCol = "metricGroup", metricColors, metricCollapseGroup = FALSE, metricGrouping = "---", labelSize = 10 )makePolarPlot( bettrList = NULL, plotdata, idCol, metricCol = "Metric", valueCol = "ScaledValue", metricGroupCol = "metricGroup", metricColors, metricCollapseGroup = FALSE, metricGrouping = "---", labelSize = 10 )
bettrList |
A |
plotdata |
A |
idCol |
Character scalar indicating which column of |
metricCol |
Character scalar indicating which column of |
valueCol |
Character scalar indicating which column of |
metricGroupCol |
Character scalar indicating which column of
|
metricColors |
Named list with colors used for the metrics and
any other metric annotations. Typically obtained as
|
metricCollapseGroup |
Logical scalar indicating whether metrics
should be collapsed by the group variable provided by
|
metricGrouping |
Character scalar indicating the column of
|
labelSize |
Numeric scalar providing the size of the labels in the plot. |
A ggplot object.
Charlotte Soneson
## Generate example data df <- data.frame(Method = c("M1", "M2", "M3"), metric1 = c(1, 2, 3), metric2 = c(3, 1, 2)) metricInfo <- data.frame(Metric = c("metric1", "metric2", "metric3"), Group = c("G1", "G2", "G2")) idInfo <- data.frame(Method = c("M1", "M2", "M3"), Type = c("T1", "T1", "T2")) prepData <- bettrGetReady(df = df, idCol = "Method", metricInfo = metricInfo, idInfo = idInfo) makePolarPlot(bettrList = prepData)## Generate example data df <- data.frame(Method = c("M1", "M2", "M3"), metric1 = c(1, 2, 3), metric2 = c(3, 1, 2)) metricInfo <- data.frame(Metric = c("metric1", "metric2", "metric3"), Group = c("G1", "G2", "G2")) idInfo <- data.frame(Method = c("M1", "M2", "M3"), Type = c("T1", "T1", "T2")) prepData <- bettrGetReady(df = df, idCol = "Method", metricInfo = metricInfo, idInfo = idInfo) makePolarPlot(bettrList = prepData)