Displaying 1 result from an estimated 1 matches for "someplotfunction".
2009 Oct 30
2
Names of list members in a plot using sapply
...,6)),B=data.frame(x=c(8,9),y=c(12,6)))
names1<-names(list1)
sapply(1:length(list1),function(i)
with(list1[[i]],plot(x,y,type="l",main=paste("Graphic of",names1[i]))))
Is there a more elegant solution for not to use two separate lists?
I would like to just use
sapply(list1, somePlotfunction)
and plot for each graphic in the title have the name of the member of
the list.
Thank you for your help.
Kenneth