I tried hard to add the dataframe's name to plot for plots more than one.
Here is sample data.
df<-structure(list(d1 = structure(list(lists..1.. = c(43L, 64L, 55L,
52L, 56L, 68L, 33L, 15L, 10L, 62L, 3L, 51L, 16L, 80L, 48L, 6L,
58L, 38L, 91L, 76L, 95L, 32L, 17L, 45L)), .Names = "lists..1..", row.names = c(NA,
-24L), class = "data.frame"), d2 = structure(list(lists..2.. = c(100L,
67L, 84L, 93L, 8L, 22L, 38L, 71L, 76L, 99L, 31L, 18L, 5L, 48L,
25L, 68L, 94L, 81L, 36L, 45L, 56L, 34L, 74L, 44L)), .Names = "lists..2..", row.names = c(NA,
-24L), class = "data.frame")), .Names = c("d1", "d2"))
And sample function:
fun<- function(x) {
h1<-max(x)
h2<-min(x)
plot(h1, h2)
pname <-lapply(x, function(x) (paste(unique(sub("\\.\\d+$", "", names(x))))))
mtext(pname,side=3,padj=2)
}
I used
out<-lapply(df, fun)
As you see, title is character(0) for both dataframe. But what I want is see d1 and d2 separately for each plot.

