origami_plot_weighted {OrigamiPlot} | R Documentation |
Function to generate weighted origami plot
Description
Function to generate weighted origami plot
Usage
origami_plot_weighted(
df,
weight,
pcol,
pfcol = NULL,
pcol2 = rgb(0.6, 0.3, 0.3, 1),
pfcol2 = NULL,
axistype = 0,
seg = 4,
pty = 16,
plty = 1:6,
plwd = 1,
pdensity = NULL,
pangle = 45,
cglty = 1.4,
cglwd = 0.1,
cglcol = "#000000",
axislabcol = "#808080",
title = "",
na.itp = TRUE,
centerzero = FALSE,
vlabels = NULL,
vlcex = 1,
caxislabels = seq(0, 1, by = 0.25),
calcex = NULL,
paxislabels = NULL,
palcex = NULL
)
Arguments
df |
dataset processed with data_preparation or in the designated form |
weight |
weight of each variable, sum up to 1 |
pcol |
color of the line of the original polygon |
pfcol |
color to fill the area of the original polygon, default is NULL. |
pcol2 |
color of the line of the weighted polygon, default is rgb(0.6,0.3,0.3,1). |
pfcol2 |
color to fill the area of the weighted polygon, default is NULL. |
axistype |
type of axes. 0:no axis label. 1:center axis label only. 2:around-the-chart label only. 3:both center and around-the-chart labels. Default is 0. |
seg |
number of segments for each axis, default is 4. |
pty |
point symbol, default is 16. 32 means not printing the points. |
plty |
line types for plot data, default is 1:6 |
plwd |
line widths for plot data, default is 1 |
pdensity |
filling density of polygons, default is NULL |
pangle |
angles of lines used as filling polygons, default is 45 |
cglty |
line type for radar grids, default is 1.4 |
cglwd |
line width for radar grids, default is 0.1 |
cglcol |
line color for radar grids, default is #000000 |
axislabcol |
color of axis label and numbers, default is #808080 |
title |
title of the chart, default is blank |
na.itp |
logical. If true, items with NA values are interpolated from nearest neighbor items and connect them. If false, items with NA are treated as the origin. Default is TRUE. |
centerzero |
logical. If true, this function draws charts with scaling originated from (0,0). If false, charts originated from (1/segments). Default is TRUE. |
vlabels |
character vector for the names for variables, default is NULL |
vlcex |
font size magnification for vlabels, default is 1 |
caxislabels |
center axis labels, default is seq(0,1,by = 0.25) |
calcex |
font size magnification for caxislabels, default is NULL |
paxislabels |
around-the-chart labels, default is NULL |
palcex |
font size magnification for paxislabels, default is NULL |
Details
This function allows the creation of an origami plot with user-specified weights for different outcomes. The weighted origami plot is a refined analytical tool that facilitates the adjustment of individual attribute weights to accurately reflect their significance in determining overall performance. For instance, if certain outcomes hold greater clinical relevance based on a scientific question, the user can assign higher weights to these outcomes relative to others. Note that the weights assigned should sum up to 1.
Value
No return value, called for visualization
Examples
data(sucra)
df_list <- data_preparation(sucra, min_value = 0.15)
origami_plot_weighted(df = df_list[[6]], weight = c(0.15,0.25,0.3,0.2,0.1),
pcol = rgb(0.2,0.5,0.5,1), pfcol = rgb(0.2,0.5,0.5,0.1),axistype=1)