Skip to content

Calling R object from R function

1 message · R. Michael Weylandt

#
On Wed, Nov 7, 2012 at 6:40 PM, Fares Said <frespider at hotmail.com> wrote:
Hi Fares,

A few points of etiquette: firstly, it's best to keep your posts on
the list so others can help. If you want individual/private help, it's
best to request it specifically or though a consulting arrangement.

Secondly, your code is not reproducible:
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
-- nor is it entirely clear to me what it's trying to do. Please try
to work up something reproducible and nicely commented.

As to the error with ls() as you use it:

ls <- list()
ls(x = 5) # Gives an error.

Note that the ls you create shadows the important function ls(). But
even if you don't do that, there's an error because x = is not a
parameter of ls().

Cheers,
Michael