- set eval of counter vignette to interactive or on travis
Showing 1 of 5 files from the diff.
Newly tracked file
R/counter.R
changed.
Other files ignored by Codecov
inst/example.R
was deleted.
vignettes/counters.Rmd
has changed.
man/figures/README-plot-1.png
has changed.
man/counter.Rd
has changed.
@@ -28,15 +28,16 @@
Loading
28 | 28 | #' The path can be set using [set_whereami_log][whereami::set_whereami_log] |
|
29 | 29 | #' |
|
30 | 30 | #' @examples |
|
31 | + | #' |
|
31 | 32 | #' if(interactive()){ |
|
32 | - | #' tf <- tempfile(fileext = '.R') |
|
33 | 33 | #' |
|
34 | - | #' # call to write to temp file |
|
35 | - | #' f1 <- "whereami::cat_where(whereami::whereami(tag = 'tag1'))" |
|
36 | - | #' f2 <- "whereami::cat_where(whereami::whereami(tag = 'tag2'))" |
|
34 | + | #' txt <- " |
|
35 | + | #' whereami::cat_where(whereami::whereami(tag = 'tag1')) |
|
36 | + | #' " |
|
37 | + | #' |
|
38 | + | #' tf <- tempfile(fileext = '.R') |
|
37 | 39 | #' |
|
38 | - | #' # write to the file (call at line 3) |
|
39 | - | #' cat('\n\n',f1,'\n\n',f2,sep='',file = tf) |
|
40 | + | #' cat(txt,file = tf) |
|
40 | 41 | #' |
|
41 | 42 | #' source(tf) |
|
42 | 43 | #' |
@@ -52,16 +53,6 @@
Loading
52 | 53 | #' |
|
53 | 54 | #' counters |
|
54 | 55 | #' |
|
55 | - | #' # using counter_reset and counter_names in a loop |
|
56 | - | #' |
|
57 | - | #' for( i in 1:10 ){ |
|
58 | - | #' |
|
59 | - | #' source(tf) |
|
60 | - | #' |
|
61 | - | #' if( counter_state(tag = 'tag1') > 5 ) |
|
62 | - | #' counter_reset(tag = 'tag2') |
|
63 | - | #' } |
|
64 | - | #' |
|
65 | 56 | #' plot(counter_get()) |
|
66 | 57 | #' |
|
67 | 58 | #' # read the json log |
@@ -77,7 +68,9 @@
Loading
77 | 68 | #' |
|
78 | 69 | #' # cleanup |
|
79 | 70 | #' unlink(tf) |
|
71 | + | #' |
|
80 | 72 | #' } |
|
73 | + | #' |
|
81 | 74 | #' @rdname counter |
|
82 | 75 | #' @author Jonathan Sidi |
|
83 | 76 | #' @family counter |
Files | Coverage |
---|---|
R | 34.01% |
Project Totals (7 files) | 34.01% |
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.