On 01.05.2012 19:57, Heiko Neuhaus wrote:
Hi all,
I am trying to create a list of all variable/value combinations in
environment().
When a function with unset arguments is called, the method I have been
using fails with a missing argument error. However it should be
possible to simply skip
Thanks a lot for your answer!
--
test1 - function(a, b, c)
{
x - as.list(environment())
print (hi from test1!)
test2(a = a, b = b, c = c)
You are rying to pass a, b, c here and hence R tries to insert those
into the environment of test2 once it is called, you have
On 02/05/2012 12:59 PM, Heiko Neuhaus wrote:
Thanks a lot for your answer!
--
test1- function(a, b, c)
{
x- as.list(environment())
print (hi from test1!)
test2(a = a, b = b, c = c)
You are rying to pass a, b, c here and hence R tries to insert those
Thank you very much for your suggestion.
f - function(a,b,c) {
names - ls(environment()) # get all the names
result - list()
for (n in names) {
if (!do.call(missing, list(as.name(n
result[n] - get(n)
}
result
}
I have already figured out a very similar solution using for/eval that
On 12-05-02 5:20 PM, Heiko Neuhaus wrote:
Thank you very much for your suggestion.
f- function(a,b,c) {
names- ls(environment()) # get all the names
result- list()
for (n in names) {
if (!do.call(missing, list(as.name(n
result[n]- get(n)
}
result
}
I have already figured out a very
Hi all,
I am trying to create a list of all variable/value combinations in
environment().
When a function with unset arguments is called, the method I have been
using fails with a missing argument error. However it should be
possible to simply skip these missing objects in the generation of
6 matches
Mail list logo