bnasr / xROI
Showing 4 of 9 files from the diff.

@@ -12,7 +12,7 @@
Loading
12 12
13 13
14 14
15 -
.onLoad <- function(libname, pkgname) {
15 +
.onAttach <- function(libname, pkgname) {
16 16
  citation =
17 17
  'To cite xROI in publications, please cite both the paper and the R package:
18 18

@@ -11,7 +11,7 @@
Loading
11 11
#' @examples
12 12
#' f <- system.file(package = 'xROI', 'dukehw-cli.jpg')
13 13
#' jp <- jpeg::readJPEG(f)
14 -
#' plotCLArray(jp)
14 +
#' if(interactive())plotCLArray(jp)
15 15
#'
16 16
plotCLArray <- function(clArray, bands=1:3){
17 17
  tmp <- tempfile()

@@ -25,12 +25,12 @@
Loading
25 25
#'
26 26
addMask <- function(mask, add = TRUE, col='black'){
27 27
  wd <- getwd()
28 -
  setwd(gettmpdir())
28 +
  setwd(tempdir())
29 29
  writeTIFF(mask*1, 'tmp.tif')
30 30
  rmask <- raster('tmp.tif')
31 31
  rmask[rmask!=0] <- NA
32 32
33 -
  plot(rmask,legend=F, add=add, col=col)
33 +
  if( interactive()) plot(rmask,legend=F, add=add, col=col)
34 34
  file.remove('tmp.tif')
35 35
  setwd(wd)
36 36
  return(0)

@@ -13,7 +13,7 @@
Loading
13 13
#' @export
14 14
#' @examples
15 15
#' f <- system.file(package = 'xROI', 'dukehw.jpg')
16 -
#' plotJPEG(f)
16 +
#' if (interactive() ) plotJPEG(f)
17 17
#'
18 18
plotJPEG <- function(path, add=FALSE, xlim = NULL, ylim = NULL)
19 19
{
Files Coverage
R 41.85%
Project Totals (16 files) 41.85%
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