You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: NEWS.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,7 @@
1
1
# DataExplorer 0.9.0
2
+
## New Features
3
+
*[#141](https://github.com/boxuancui/DataExplorer/issues/141): Added `plotly` argument to all plot functions. When `plotly = TRUE`, plots are converted to interactive plotly objects via `plotly::ggplotly()` (requires the plotly package).
4
+
2
5
## Enhancements
3
6
*[#181](https://github.com/boxuancui/DataExplorer/issues/181): Added `by` argument to `plot_histogram` and `plot_density` to break down distributions by a discrete or continuous feature.
Copy file name to clipboardExpand all lines: R/create_report.R
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@
6
6
#' @param output_file output file name in \link[rmarkdown]{render}. Default is "report.html".
7
7
#' @param output_dir output directory for report in \link[rmarkdown]{render}. Default is user's current directory.
8
8
#' @param y name of response variable if any. Response variables will be passed to appropriate plotting functions automatically.
9
+
#' @param plotly if \code{TRUE}, use interactive plotly charts in the report (requires the \pkg{plotly} package). Default is \code{FALSE}. Only applies to HTML output; PDF reports use static plots.
9
10
#' @param config report configuration generated by \link{configure_report}.
10
11
#' @param report_title report title. Default is "Data Profiling Report".
11
12
#' @param \dots other arguments to be passed to \link[rmarkdown]{render}.
@@ -33,6 +34,13 @@
33
34
#' # Create report
34
35
#' create_report(iris)
35
36
#' create_report(airquality, y = "Ozone")
37
+
#'
38
+
#' # Create report with plotly
39
+
#' # Note: It is a known issue that some facet panels may not show up in plotly.
Copy file name to clipboardExpand all lines: R/plot_correlation.R
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@
9
9
#' @param title plot title
10
10
#' @param ggtheme complete ggplot2 themes. The default is \link[ggplot2]{theme_gray}.
11
11
#' @param theme_config a list of configurations to be passed to \link[ggplot2]{theme}.
12
+
#' @param plotly if \code{TRUE}, convert to interactive plotly object (requires the \pkg{plotly} package). Default is \code{FALSE}.
12
13
#' @return invisibly return the ggplot object
13
14
#' @keywords plot_correlation
14
15
#' @details For discrete features, the function first dummifies all categories, then calculates the correlation matrix (see \link[stats]{cor}) and plots it.
@@ -27,7 +28,8 @@ plot_correlation <- function(data, type = c("all", "discrete", "continuous"), ma
27
28
title=NULL,
28
29
ggtheme= theme_gray(),
29
30
theme_config=list("legend.position"="bottom",
30
-
"axis.text.x"= element_text(angle=90))) {
31
+
"axis.text.x"= element_text(angle=90)),
32
+
plotly=FALSE) {
31
33
## Declare variable first to pass R CMD check
32
34
Var1<-Var2<-value<-NULL
33
35
## Set data to data.table
@@ -73,6 +75,7 @@ plot_correlation <- function(data, type = c("all", "discrete", "continuous"), ma
0 commit comments