Question Monitoring R-code activity

How to monitor the R-Code activity?
Could we write a code to get it?
Last edited:

Cringer Moderator
Staff member
Your requirements are too vague and incomprehensible. Are you wanting to record how often a piece of r-code is used?


What does the startup parameter documentation have to do with "monitoring r-code activity"?

When I hear "monitoring r-code activity" I think of the profiler. Line by line execution statistics. How often each line of code was run and how long it took.

Or, perhaps, a subset of that data: what procedures were called.

Or, maybe, something about how much memory a bit of r-code consumes.

Possibly some information about dynamic objects created and deleted at runtime by your code?
My question about R-code execution environment statistics.
how we will use the -y and -yd parameters.
I have seen


I don't mean to be rude but this is a fairly strange area to focus on for someone who appears to be a beginner. What is it that you are trying to achieve? What is your goal with exploring these questions?

For what it is worth I, personally, have a couple of uses for that data:

1) if you collect it comprehensively across all clients and for a reasonable period of time you can use it to determine what parts of a large legacy code base are actually being used. This in turn can be used to figure out which procedures are probably "dead wood" (procedures that are never executed). This isn't quite perfect -- you're looking for a negative and there are various ways that exceptions might not be noted. But it can provide a pretty good starting point for that sort of project.

2) r-code swapping data can identify a need to increase -mmax