Re: [R] use of ddply() within function

2012-09-07 Thread Franckx Laurent
4:56 To: Franckx Laurent; 'r-help@r-project.org' Subject: Re: [R] use of ddply() within function As the footer says, "provide commented, _minimal_, self-contained, reproducible code." This is hardly "minimal" or reproducible. Anyway, this probably ought to qualify as a p

Re: [R] use of ddply() within function

2012-09-06 Thread Jeff Newmiller
As the footer says, "provide commented, _minimal_, self-contained, reproducible code." This is hardly "minimal" or reproducible. Anyway, this probably ought to qualify as a plyr FAQ of some sort: don't use the summarise function as the FUN argument within a function. Define a named or anonymous

[R] use of ddply() within function

2012-09-06 Thread Franckx Laurent
Dear all, I am encountering problems with the application of ddply within the body of a self-defined function. The script is the following: moncostcarmoto <- function(costtype){ costaux_result <- data.frame() for (purp in PURPcount){for (per in PERcount){