KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'd like to give a params argument to a function and then attach it so that I can use a instead of params$a everytime I refer to the list element a. run.simulation<-function(model,params){ attach(params) # # Use elements of params as parameters in a simulation detach(params) } Is there a problem with this? If I have defined a global variable named c and have also defined an element named c of the list "params" , whose value would be used after the attach command?
Tags (comma-separated)
Save Edits
Cancel