When I use lapply and print to the console it prints unwanted [[i]]NULL though I want the intended message to print to the console. I\'ve tried
lapply
[[i]]NULL
Use l_ply from plyr:
l_ply
library(plyr) FUN <- function(x) { FUN2 <- function(z) message(z) l_ply(1:3, function(i) FUN2(paste(x, i))) } FUN("hello")