Description Usage Arguments Details Examples
View source: R/lipidome_comparison_visualization.R
'parallel_plot' prints a paralell coordinates plot using a data frame
1 2 3 4 5 6 7 8 9 10 11 | parallel_plot(
input_df,
group_vector,
out_path = "none",
title = "Parallel Plot",
x_title = "",
y_title = "",
legend_title = "",
col_names = colnames(dplyr::select_if(input_df, is.numeric)),
scale = "globalminmax"
)
|
input_df |
data frame. |
group_vector |
vector. Vector (part of the data frame), to sort by. |
out_path |
string. Path to save parallel plot to png. If out_path is empty the parallel plot is printed to the device. |
title |
string. Main Title. Default = "Parallel plot" |
x_title |
string. Title of x-axis. Default: none |
y_title |
string. Title of y-axis. Default: none |
legend_title |
string. Title of legend. Default: none |
col_names |
vector. Column names of the data frame and lables on the x-axis. Default: colnames(input_df) |
scale |
string. Method used to scale the variable. Default = "globalminmax". Options: "std", "robust", "uniminmax", "globalminmax", "center", "centerObs". For more information on the options see help(ggparcoord). |
This function takes a data frame with at least one factor variable and displays it in a pralell coordinates plot, where the different groups are color coded. This plot works best for <= 10 parameters.
1 2 3 4 5 6 | parallel_plot(iris, iris$Species)
## Not run:
dir.create(paste(getwd(), "/examples", sep = ""), showWarnings = FALSE)
dir <- paste(getwd(), "/examples/iris", sep = "")
parallel_plot(iris, 5, out_path = dir)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.