Skip to content
Prev 179569 / 398503 Next

Show name of dataset in graph

of
This demonstrates the basic idea:

dfr1 <- data.frame(x=1:10, y=runif(10))
dfr2 <- data.frame(x=11:20, y=runif(10))

library(lattice)
myplot <- function(dfr)
{
   xyplot(y~x, 
   data=dfr, 
   main=as.character(substitute(dfr))) 
}

myplot(dfr1)
myplot(dfr2)

Regards,
Richie.

Mathematical Sciences Unit
HSL

------------------------------------------------------------------------
ATTENTION:

This message contains privileged and confidential inform...{{dropped:20}}