[rkward-cvs] rkward/rkward/rbackend/rpackages/rkward/R public.R,1.6,1.7

Pierre ecoch at users.sourceforge.net
Sun Feb 27 10:38:58 UTC 2005


Update of /cvsroot/rkward/rkward/rkward/rbackend/rpackages/rkward/R
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8387/rbackend/rpackages/rkward/R

Modified Files:
	public.R 
Log Message:
Adding functions to view graphs in the output window.

Index: public.R
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rbackend/rpackages/rkward/R/public.R,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** public.R	14 Sep 2004 12:27:11 -0000	1.6
--- public.R	27 Feb 2005 10:38:55 -0000	1.7
***************
*** 57,58 ****
--- 57,82 ----
  	error ("Could not find column with given name")
  }
+ 
+ 
+ # Requests a graph to be written.
+ "rk.graph.on" <- function(){
+ 	i=1
+ 	while(file.exists(file.path(.rk.output.path,paste("graph",i,".png",sep="")))) {
+ 		i=i+1
+ 	}
+ 	png(file.path(.rk.output.path,paste("graph",i,".png",sep="")))
+ 	cat(paste("<img src=\"", paste("graph",i,".png",sep=""),"\"><br>",sep=""),file=.rk.output.file,append=TRUE)
+ }
+ 
+ "rk.graph.off" <- function(){
+ 	dev.off()
+ }
+ 
+ "rk.print" <- function(x) {
+ 	if(require(R2HTML)==TRUE) {
+ 		.HTML.file = .rk.output.file
+ 		HTML(x)
+ 	}
+ }
+ 
+ 





More information about the rkward-tracker mailing list