Re: [R] Getting at what a named object represents in a function...

2007-10-20 Thread Prof Brian Ripley
Because of lazy evaluation, your function can find the expression for 'param' by deparse(substitute(param)), provided that is called before 'param' is actually used. However, although that would allow you to change 'list' in the calling environment, that is regarded as really bad programming p

[R] Getting at what a named object represents in a function...

2007-10-20 Thread Martin Waller
Hi, I'm pretty new to R. I have an object (say a list) and I I have a function that I call on various columns in that list (excuse terminology if it's wrong/ambiguous). Imagine its like this (actual values are unimportant) and called mylist: >mylist AB 15 25 36 48 50