Skip to content

Show name of dataset in graph

2 messages · O. Günther, Richard Cotton

#
Hi,

I?ve written a script to run several multivariate statistical analysis
automatically.
As one result a biplot and screeplot is produced.
Now I?d like to display the name of the inputdatset as part of the title of
these graphics and I do not want to enter it each time I run the script.
How can I extract the name of a dataset?
An (shortened) extraction from the script:
several mathematical Operations
.

Instead of the ??? I? d like to have a variable.
For example if 
Test1(dataset.typ5, sec.typ5, Pca=TRUE)
then the title of the plots should be 
?PCA ? dataset.typ5?

Does anyone know a way?

Regards,
oli
#
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}}