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 si
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
bas
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 trie
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 h
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
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 o
6 matches
Mail list logo