Dear all,

 

Could you please give me a hand on parallel function from package
lattice?

 

On the R command console, the following commands can output a parallel
coordinate plot to the pdf file.

library(lattice); pdf("trial.pdf"); data(iris); parallel(~iris[1:4] |
Species, iris); dev.off();

However, if these commands are encapsulated into a function, the
resultant pdf file is empty. For example, we define a simple function
paraExam below, paraExam() may generate a pdf file which is empty from a
pdf viewer. 

paraExam<-function(file="trial.pdf"){

 library(lattice);

 pdf(file);

 data(iris);

 parallel(~iris[1:4] | Species, iris);

 dev.off();

 }

 

Please give me some tips to output parallel coordinate plots to a pdf
file within a function successfully?

Regards,

Warren

 


	[[alternative HTML version deleted]]


