Java Mailing List Archive

http://www.r-help.com/

Home » Home (12/2007) » R Help for Statistical Computing »

[R] Ask for help on the parallel function output to a pdf file

Warren Jin

2005-02-20

Replies:

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]]

______________________________________________
R-help@(protected)
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
©2008 r-help.com - Jax Systems, LLC, U.S.A.