[rkward-cvs] rkward/rkward/rbackend/rpackages/rkward/R public.R,1.10,1.11
Thomas Friedrichsmeier
tfry at users.sourceforge.net
Thu Apr 28 20:05:12 UTC 2005
Update of /cvsroot/rkward/rkward/rkward/rbackend/rpackages/rkward/R
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19121/rpackages/rkward/R
Modified Files:
public.R
Log Message:
Using functions to get temporary filenames and output filename. Not prone to deletion of variables
Index: public.R
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rbackend/rpackages/rkward/R/public.R,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** public.R 22 Apr 2005 06:17:15 -0000 1.10
--- public.R 28 Apr 2005 20:05:10 -0000 1.11
***************
*** 43,46 ****
--- 43,50 ----
}
+ "rk.get.output.html.file" <- function () {
+ return (.rk.do.call ("get.output.html.file", ""))
+ }
+
# renames a named object in a data.frame/list without changing it's position
# TODO: create a generic function instead, that can handle all kinds of renames
***************
*** 58,70 ****
}
-
# 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)
}
--- 62,70 ----
}
# Requests a graph to be written.
"rk.graph.on" <- function(){
! filename <- rk.get.tempfile.name (prefix="graph", extension=".png");
! png (file.path (filename))
! cat (paste ("<img src=\"", filename,"\"><br>", sep=""),file=rk.get.output.html.file (), append=TRUE)
}
More information about the rkward-tracker
mailing list