Counted | R Documentation |
Counted()
takes two functions as arguments:
The function whose call frequency
should be measured and a counter object created by newCounter()
.
It returns a counted function.
Counted(FUN, counter)
FUN |
A function whose run time should be measured. |
counter |
A counter generated by |
A counted function.
Other Performance Measurement:
Timed()
,
newCounter()
,
newTimer()
test<-function(v) {sum(v)}
testCounter<-newCounter()
testCounted<-Counted(test, testCounter)
testCounter("Show")
testCounted(sample(10,10)); testCounted(sample(10,10))
testCounter("Show")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.