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

added @export;

bugfix scatterplot;
added newline in violinplot template
parent 7bdd4630
......@@ -5,10 +5,12 @@ export("%>%")
export(barplot)
export(boxplot)
export(create_barplot_df)
export(create_violinplot_df)
export(plotly_barplot)
export(plotly_boxplot)
export(plotly_scatterplot)
export(create_violinplot_df)
export(plotly_violinplot)
export(scatterplot)
export(violinplot)
importFrom(magrittr,"%<>%")
importFrom(magrittr,"%>%")
......@@ -9,6 +9,7 @@
#' @param title (Optional) The title of the components junk.
#'
#' @return A string containing markdown code for the rendered textbox
#' @export
scatterplot <- function(object, x, y, colour_by = NULL, labels = NULL, expression = NULL, title = NULL) {
# Create random env id
env_id <- paste0("env_", stringi::stri_rand_strings(1, 6, pattern = "[A-Za-z0-9]"))
......
......@@ -8,6 +8,7 @@
#' @param title_group_by (Optional) The title of the x-axis that describes the grouping factor. In case of a named list this parameter is not needed because the names of the list will be used as title of the x axis.
#'
#' @return A string containing markdown code for the rendered component
#' @export
violinplot <- function(object, y, group_by = NULL, title = NULL, title_y = NULL, title_group_by = NULL) {
# Create random env id
env_id <- paste0("env_", stringi::stri_rand_strings(1, 6, pattern = "[A-Za-z0-9]"))
......
......@@ -90,7 +90,7 @@ df_{{ env_id }} <- shiny::reactive({
}
# Set values for 'y'
if( !{{ env_id }}$y_selection ) {
y <- {{ env_id }}y[1]
y <- {{ env_id }}$y[1]
} else {
y <- {{ env_id }}$y[input$select_y_{{ env_id }}]
}
......
......@@ -86,3 +86,4 @@ shiny::fillCol(flex = c(NA, 1),
)
```
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/visualization_functions.R
\name{create_barplot_df}
\alias{create_barplot_df}
\title{Function to create a dataframe for plotly_barplot.}
\usage{
create_barplot_df(group_by, x = NULL)
}
\arguments{
\item{group_by}{A list with factorial values, by which observations can optionally be grouped.}
\item{x}{(Optional) A named list with the observations for the barplot.}
}
\value{
An object of class \code{list} containig the dataframe 'df', the vector 'x' with values for the x-axis, the vector 'y' with values for the y-axis, the vector 'names' (can be NULL), the boolean value 'showlegend'.
}
\description{
Function to create a dataframe for plotly_barplot.
}
......@@ -8,15 +8,13 @@ plotly_barplot(..., showlegend = NULL, title_x = NULL,
title_group_by = NULL)
}
\arguments{
\item{showlegend}{Boolean that describes if the legend is shown}
\item{...}{these arguments are of either the form value or tag = value and should be valid for the 'plotly::plot_ly()' method.}
\item{title_x}{A title that describes the observations.}
\item{showlegend}{(Optional) Boolean value that describes if the legend should be shown.}
\item{title_group_by}{A title that describes the grouping factor.}
\item{title_x}{(Optional) A title that describes the observations.}
\item{group_by}{A factor, by which observations can optionally be grouped.}
\item{x}{Numeric observations for the boxplot.}
\item{title_group_by}{(Optional) A title that describes the grouping factor.}
}
\value{
An object of class \code{plotly}.
......
......@@ -9,13 +9,11 @@ plotly_boxplot(df, ..., title_x = NULL, title_group_by = NULL)
\arguments{
\item{df}{A dataframe containing the data fo the boxplot.}
\item{...}{these arguments are of either the form value or tag = value and should be valid for the 'plotly::plot_ly()'}
\item{title_x}{A title that describes the observations.}
\item{title_group_by}{A title that describes the grouping factor.}
\item{x}{A named list with the observations for the boxplot.}
\item{group_by}{A list with factorial values, by which observations can optionally be grouped.}
}
\value{
An object of class \code{plotly}.
......
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