Displaying 1 result from an estimated 1 matches for "noitce".
Did you mean:
noice
2009 Aug 17
1
how to pass more than one argument to the function called by lapply?
Dear R helpers:
I wonder how to pass more than one argument to the function called by
lapply.
For example,
#R code below ---------------------------
indf <- data.frame(id=I(c('a','b')),y=c(1,10))
#I want to add an addition argument cutoff into the function called by
lapply.
outside.fun <- function(indf, cutoff)
{
unlist(lapply(split(indf, indf[,'id']),