[rkward-cvs] SF.net SVN: rkward:[2803] trunk/rkward/rkward/rbackend/rpackages/rkward/R/ public.R

tfry at users.sourceforge.net tfry at users.sourceforge.net
Mon Mar 22 16:51:43 UTC 2010


Revision: 2803
          http://rkward.svn.sourceforge.net/rkward/?rev=2803&view=rev
Author:   tfry
Date:     2010-03-22 16:51:43 +0000 (Mon, 22 Mar 2010)

Log Message:
-----------
getOption() had no 'default' parameter in R 2.9

Modified Paths:
--------------
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/public.R

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/public.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/public.R	2010-03-22 16:50:31 UTC (rev 2802)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/public.R	2010-03-22 16:51:43 UTC (rev 2803)
@@ -158,7 +158,10 @@
 		.rk.cat.output(paste("<img src=\"", filename, "\" width=\"", width, 
 			"\" height=\"", height, "\"><br>", sep = ""))
 	} else if (device.type == "JPG") {
-		if (missing (quality)) quality = getOption ("rk.graphics.jpg.quality", 75)
+		if (missing (quality)) {
+			quality = getOption ("rk.graphics.jpg.quality")		# COMPAT: getOption (x, *default*) not yet available in R 2.9
+			if (is.null (quality)) quality = 75
+		}
 		filename <- rk.get.tempfile.name(prefix = "graph", extension = ".jpg")
 		ret <- jpeg(filename = file.path(filename), width = width, height = height, "quality"=quality, ...)
 		.rk.cat.output(paste("<img src=\"", filename, "\" width=\"", width, 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list