search for: lappply

Displaying 1 result from an estimated 1 matches for "lappply".

Did you mean: lapply
2008 Nov 20
3
Error with lapply
I have written following codes, with intention to get a list with values 1,2,9,16 : fn <- function(i) return(i^2) lapply(1:4, fn, i) However I got following error : Error in FUN(1:4[[1L]], ...) : unused argument(s) (1) Can anyone please tell me what will be the correct code here? Regards, -- View this message in context: http://www.nabble.com/Error-with-lapply-tp20605066p20605066.html