Re: [R] Process dataframes from list

2008-10-26 Thread Kaom Te
I think you need to be a bit more specific on this one. What is the format of your data.frames? On disk or actually in your workspace? Example code would also help. Even psuedo code describing what you want to do. Regards, Kaom On Oct 26, 2008, at 1:10 PM, Wade Wall wrote: Hi all,

Re: [R] Trying to pass arrays as arguments to a function

2008-10-20 Thread Kaom Te
y <- ifelse(x == 3, 1, y) -Kaom On Oct 20, 2008, at 6:07 AM, Kåre Edvardsen wrote: I'd like to avoid looping through an array in order to change values in the array as it takes too long. I red from an earlier post it can be done by "do.call" but never got it to work. The Idea is to change

Re: [R] passing a list where names arguments are expected

2008-10-19 Thread Kaom Te
I believe you want do.call(f, list(a =..., b=...)) ?do.call -Kaom On Oct 19, 2008, at 7:55 PM, erwann rogard wrote: hi, say i have a function f and i'd like to to call it like this: 1) f(list(a=...,b=...)) but i can't do it, because f is defined as: 2) f<-function(a=NULL,b=NULL){...} is t

Re: [R] The evaluation of optional function arguments

2008-10-19 Thread Kaom Te
Try this for timesDefineInside: timesDefineInside <- function(foo, ...) { extra.args <- list(...) bar <- extra.args$bar foo * bar } -Kaom On Oct 19, 2008, at 6:34 PM, Sietse Brouwer wrote: > Dear R-helpers, > > I've got two functions; callTimes() calls times(), passing it an > opt