HI, I don't understand why you're using lapply.
Please provide a example of your 'x' data.frame str(x) On 27/03/2008, Paul Lemmens <[EMAIL PROTECTED]> wrote: > Hi Henrique, > > > On Thu, Mar 27, 2008 at 2:52 PM, Henrique Dallazuanna <[EMAIL PROTECTED]> > wrote: > > Try this: > > > > foo <- function(x) > > { > > clipname <- "LK" > > out <- list() > > out[[clipname]] <- rnorm(5) > > return(out) > > } > > That easy ... Hadn't thought of it. But now I have a refinement in foo() > > foo <- function(x) { > out <- list() > lapply(x$clipno, function(c) { > clipname <- x$clipname > # stuff > > out[[clipname]] <- rnorm(5) > }) > return(out) > } > > > But this returns the/an empty list? > > > Best regards, > > Paul Lemmens > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.