[R] Show name of dataset in graph

O. Günther o.guenther at ihwb.tu-darmstadt.de
Thu May 7 13:50:04 CEST 2009


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:

>Test1 <- function(pri, sec, Pca, Ca, Dca){
>#pri  - primary Parameters (biological Dataset (abundances))
>#sec – secondary Parameters 
>#Pca, Ca, Dca – Default=F, If set to TRUE these Methods are active

several mathematical Operations

>biplot(pri, pc.biplot=T, main=paste(“PCA - ”, ???)
.

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



More information about the R-help mailing list