Commit 3c6e6321 authored by arsenij.ustjanzew's avatar arsenij.ustjanzew
Browse files

created new branch;

changed visualization function
added reexport.R
parent 0de9c508
#' magrittr forward-pipe operator
#'
#' See \code{\link[magrittr]{\%>\%}}.
#' @name %>%
#' @importFrom magrittr %>%
#' @export %>%
NULL
#' magrittr forward-backward-pipe operator
#'
#' See \code{\link[magrittr]{\%<>\%}}.
#' @name %<>%
#' @importFrom magrittr %<>%
#' @export %<>%
NULL
......@@ -128,18 +128,25 @@
#' Render a box plot with plotly.
#'
#' @param x Numeric observations for the boxplot.
#' @param df A dataframe containing the data fo the boxplot.
#' @param group_by A factor, by which observations can optionally be grouped.
#' @param title A title that describes the observations.
#' @param group_by_title A title that describes the grouping factor.
#' @param title_x A title that describes the observations.
#' @param title_group_by A title that describes the grouping factor.
#'
#' @return An object of class \code{plotly}.
#' @export
plotly_boxplot <- function(x, group_by = NULL, title = "", group_by_title = NULL){
plotly::plot_ly(x = x, y = group_by, type = "box", name = title) %>%
plotly::layout(xaxis = list(title = title, showline = T),
yaxis = list(title = group_by_title, showline = T, showticklabels = T),
showlegend = T)
plotly_boxplot <- function(df, group_by = NULL, title_x = NULL, title_group_by = NULL){
if (is.null(group_by)) {
y <- NULL
} else {
y <- df[[2]]
}
x <- df[[1]]
plotly::plot_ly(x = x, y = y, type = "box", name = names(df[1])) %>%
plotly::layout(xaxis = list(title = title_x, showline = T),
yaxis = list(title = title_group_by, showline = T, showticklabels = T),
showlegend = F)
}
#' Render a violin plot
......
i2dash.scrnaseq @ f6639ede
Subproject commit f6639ede8605016764ba8b4f5e3773f4d5a6b33b
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment