newCounter {xegaSelectGene} | R Documentation |
newCounter
sets up a counter object with one
internal state variable, namely count
to count the number of counter calls.
newCounter()
Generate a counter:
a<-newCounter()
sets up the counter a
.
The counter a
supports three methods:
a()
or
a("Measure")
or
a(method="Measure")
starts the timer when called 1st, 3rd, 5th, ... time
and stops the timer
when called the 2nd, 4th, 6th, ... time.
The calls can be manually inserted
before and after a block of R-code for profiling.
a("Count")
or
a(method="Count")
returns the number of times
the function/block or R-code has been executed.
newCounter()
returns a counter function.
a_counter_function()
returns the
number of times it has been called
(invisible).
a_counter_function("Show")
returns the number of executions
of the a_counter_function
.
Other Performance Measurement:
Counted()
,
Timed()
,
newTimer()
a<-newCounter()
a(); a()
a("Show")