|
1 | | -#' Univariate and bivariate visualizations module |
| 1 | +#' `teal` module: Univariate and bivariate visualizations |
2 | 2 | #' |
3 | 3 | #' Module enables the creation of univariate and bivariate plots, |
4 | 4 | #' facilitating the exploration of data distributions and relationships between two variables. |
|
44 | 44 | #' Does not allow scaling to be changed by default (`FALSE`). |
45 | 45 | #' @param swap_axes (`logical`, optional) Whether to swap X and Y axes. Defaults to `FALSE`. |
46 | 46 | #' |
| 47 | +#' @inherit shared_params return |
| 48 | +#' |
47 | 49 | #' @examples |
48 | 50 | #' library(teal.widgets) |
49 | 51 | #' |
50 | | -#' # general data exapmle |
| 52 | +#' # general data example |
51 | 53 | #' data <- teal_data() |
52 | 54 | #' data <- within(data, { |
53 | 55 | #' require(nestcolor) |
@@ -299,9 +301,7 @@ tm_g_bivariate <- function(label = "Bivariate Plots", |
299 | 301 | ) |
300 | 302 | } |
301 | 303 |
|
302 | | -# UI function for the bivariate module. |
303 | | -#' @noRd |
304 | | -#' @keywords internal |
| 304 | +# UI function for the bivariate module |
305 | 305 | ui_g_bivariate <- function(id, ...) { |
306 | 306 | args <- list(...) |
307 | 307 | is_single_dataset_value <- teal.transform::is_single_dataset( |
@@ -442,9 +442,7 @@ ui_g_bivariate <- function(id, ...) { |
442 | 442 | ) |
443 | 443 | } |
444 | 444 |
|
445 | | -# Server function for the bivariate module. |
446 | | -#' @noRd |
447 | | -#' @keywords internal |
| 445 | +# Server function for the bivariate module |
448 | 446 | srv_g_bivariate <- function(id, |
449 | 447 | data, |
450 | 448 | reporter, |
@@ -726,8 +724,6 @@ srv_g_bivariate <- function(id, |
726 | 724 | } |
727 | 725 |
|
728 | 726 | # Get Substituted ggplot call |
729 | | -#' @noRd |
730 | | -#' @keywords internal |
731 | 727 | bivariate_plot_call <- function(data_name, |
732 | 728 | x = character(0), |
733 | 729 | y = character(0), |
@@ -778,8 +774,6 @@ bivariate_plot_call <- function(data_name, |
778 | 774 |
|
779 | 775 | # Create ggplot part of plot call |
780 | 776 | # Due to the type of the x and y variable the plot type is chosen |
781 | | -#' @noRd |
782 | | -#' @keywords internal |
783 | 777 | bivariate_ggplot_call <- function(x_class = c("NULL", "numeric", "integer", "factor", "character", "logical"), |
784 | 778 | y_class = c("NULL", "numeric", "integer", "factor", "character", "logical"), |
785 | 779 | freq = TRUE, |
@@ -963,9 +957,7 @@ bivariate_ggplot_call <- function(x_class = c("NULL", "numeric", "integer", "fac |
963 | 957 | plot_call |
964 | 958 | } |
965 | 959 |
|
966 | | -#' Create facet call |
967 | | -#' @noRd |
968 | | -#' @keywords internal |
| 960 | +# Create facet call |
969 | 961 | facet_ggplot_call <- function(row_facet = character(0), |
970 | 962 | col_facet = character(0), |
971 | 963 | free_x_scales = FALSE, |
@@ -996,8 +988,6 @@ facet_ggplot_call <- function(row_facet = character(0), |
996 | 988 | } |
997 | 989 | } |
998 | 990 |
|
999 | | -#' @noRd |
1000 | | -#' @keywords internal |
1001 | 991 | coloring_ggplot_call <- function(colour, |
1002 | 992 | fill, |
1003 | 993 | size, |
|
0 commit comments