I have a task to write four simple funtions in R . One of these functions is a master function with only one argument, which tells how many times the other three functions should be executed. These functions should be executed at random and they should print their own names. The problem is that respectively executed functions should be defined in different environments. To define these functions i should use only global environment and one additionally defined env. How should i apply recursion to this problem?
Is your question related to work you are doing for a course or training? If so, please take a look at this FAQ and make sure you're following our policies for such questions:
Either way, I think it will help if you can show some of the code you've tried so far. There are a lot of different things going on in your question, and people will be able to help best if they can see exactly where you're getting stuck.