@@ -10,6 +10,7 @@
Loading
10 10
#' @param type Lower tail or upper tail.
11 11
#' @param normal If \code{TRUE}, normal curve with same \code{mean} and
12 12
#' \code{sd} as the chi square distribution is drawn.
13 +
#' @param xaxis_range The upper range of the X axis.
13 14
#' @param print_plot logical; if \code{TRUE}, prints the plot else returns a plot object.
14 15
#'
15 16
#' @examples
@@ -30,7 +31,8 @@
Loading
30 31
#'
31 32
#' @export
32 33
#'
33 -
vdist_chisquare_plot <- function(df = 3, normal = FALSE, print_plot = TRUE) {
34 +
vdist_chisquare_plot <- function(df = 3, normal = FALSE,
35 +
                                 xaxis_range = 25, print_plot = TRUE) {
34 36
35 37
	if (!is.numeric(df)) {
36 38
    stop("df must be numeric/integer")
@@ -43,7 +45,7 @@
Loading
43 45
	df    <- as.integer(df)
44 46
	chim  <- round(df, 3)
45 47
	chisd <- round(sqrt(2 * df), 3)
46 -
	x     <- seq(0, 25, 0.01)
48 +
	x     <- seq(0, xaxis_range, 0.01)
47 49
	data  <- stats::dchisq(x, df)
48 50
49 51
	plot_data  <- data.frame(x = x, chi = data)
@@ -62,7 +64,7 @@
Loading
62 64
	  ggplot2::xlab(paste("Mean =", chim, " Std Dev. =", chisd)) +
63 65
	  ggplot2::theme(plot.title = ggplot2::element_text(hjust = 0.5),
64 66
	                 plot.subtitle = ggplot2::element_text(hjust = 0.5)) +
65 -
	  ggplot2::scale_x_continuous(breaks = seq(0, 25, 2)) +
67 +
	  ggplot2::scale_x_continuous(breaks = seq(0, xaxis_range, 2)) +
66 68
	  ggplot2::geom_polygon(data    = poly_data,
67 69
	                        mapping = ggplot2::aes(x = y, y = z),
68 70
	                        fill    = '#4682B4') +
Files Coverage
R 91.41%
Project Totals (8 files) 91.41%
1
comment: false
2

3
coverage:
4
  status:
5
    project:
6
      default:
7
        target: auto
8
        threshold: 1%
9
    patch:
10
      default:
11
        target: auto
12
        threshold: 1%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading