[R] Tracking what R actually executes

Fisher Dennis fisher at plessthan.com
Fri Jan 3 00:05:56 CET 2014


R 3.0.2
All platforms

Colleagues

This question is probably conceptual rather than technical and I have not thought out all of the issues yet.  Let’s say I have an extensive list of functions and some lines of code that call the functions.  I would like to have a record of all the commands that were actually executed.  I realize that this could be voluminous but it might be necessary.
For example, the code and function might be:

###############
INPUT:
COUNTER	<- function(N)
	for (i in 1:N)	cat(“count”, i, “\n”)
COUNTER(10)

###############
OUTPUT:
cat(“count”, 1, “\n”)
cat(“count”, 2, “\n”)
cat(“count”, 3, “\n”)
cat(“count”, 4, “\n”)
cat(“count”, 5, “\n”)
cat(“count”, 6, “\n”)
cat(“count”, 7, “\n”)
cat(“count”, 8, “\n”)
cat(“count”, 9, “\n”)
cat(“count”, 10, “\n”)

#################
If I have formulated the question poorly, please do you best to understand the intent.  

Dennis


Dennis Fisher MD
P < (The "P Less Than" Company)
Phone: 1-866-PLessThan (1-866-753-7784)
Fax: 1-866-PLessThan (1-866-753-7784)
www.PLessThan.com



More information about the R-help mailing list