ewenharrison / finalfit

@@ -443,8 +443,7 @@
Loading
443 443
												 					dplyr::mutate(., 
444 444
												 												col_total = sum(n),
445 445
												 												prop = 100 * n / col_total,
446 -
												 												Total = format_n_percent(row_total, col_total_prop, digits[[4]], 
447 -
												 																								 na_include = FALSE)
446 +
												 												Total = format_n_percent(row_total, col_total_prop, digits[[4]])
448 447
												 					)
449 448
												 				} else {
450 449
												 					dplyr::mutate(., 

@@ -429,12 +429,12 @@
Loading
429 429
#' @export
430 430
#'
431 431
format_n_percent = function(n, percent, digits, na_include = TRUE) {
432 -
	if(is.na(percent) && !na_include){
433 -
		paste0(n)
434 -
	} else {
435 -
		percent = round_tidy(percent, digits)
436 -
		paste0(n, " (", percent, ")")
432 +
	percent = round_tidy(percent, digits)
433 +
	out = paste0(n, " (", percent, ")")
434 +
	if(!na_include){
435 +
		out = gsub(" \\(NA\\)", "", out)
437 436
	}
437 +
	return(out)
438 438
}
439 439
440 440
#' Remove intercept from model output
Files Coverage
R 82.15%
Project Totals (39 files) 82.15%
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