Loading...
 
Skip to main content

History: Profile_r_test4_export

Source of version: 7

Copy to clipboard
            {maketoc}

!# Testing that basic R works
{CODE()}
{R()}1:10{R}
{CODE}

{R()}1:10{R}

-==-

!# Testing that basic plotting works
{CODE()}
{R()}x<-c(1:10)
y <- x*x
plot(x,y)
{R}
{CODE}

{R()}x<-c(1:10)
y <- x*x
plot(x,y)
{R}

-==-
!# Testing with security parameter

!!# No security param set, 1 banned command (png) used
By default security param is 1 (TRUE), so that checking banned params for security is performed.

{CODE()}
{R()}x<-c(1:20)
y <- x*x
png(filename = "temp/mytest_20.png");
plot(x,y)
{R}
{CODE}

{R()}x<-c(1:20)
y <- x*x
png(filename = "temp/mytest_20.png");
plot(x,y)
{R}

-==-

!!# Security param explicitly = 1 & 1 banned command (png) used
Same behavior as before (no explicitly setting the security param) is expected: the command should be banned.

{CODE()}
{R(security=1)}x<-c(1:30)
y <- x*x
png(filename = "temp/mytest_30.png");
plot(x,y)
{R}
{CODE}

{R(security=1)}x<-c(1:30)
y <- x*x
png(filename = "temp/mytest_30.png");
plot(x,y)
{R}

-==-

!!# Security param explicitly = 0 & 1 banned command (png) used
Forced mode to disallow security checking, so that banned commands can be executed.

{CODE()}
{R(security=0)}x<-c(1:40)
y <- x*x
png(filename = "temp/mytest_40.png");
plot(x,y)
{R}
{CODE}

{R(security=0)}x<-c(1:40)
y <- x*x
png(filename = "temp/mytest_40.png");
plot(x,y)
{R}

-==-

!!# Security param explicitly > 1 & 1 banned command (png) used
Since security param is not zero, security checking should be applied.

{CODE()}
{R(security=2)}x<-c(1:50)
y <- x*x
png(filename = "temp/mytest_50.png");
plot(x,y)
{R}
{CODE}

{R(security=2)}x<-c(1:50)
y <- x*x
png(filename = "temp/mytest_50.png");
plot(x,y)
{R}

-==-
!# Testing with X11 parameter

!!# X11 param as 1

{CODE()}
{R(X11=1)}
x<-c(11:20)
y <- x*x
plot(x,y)
{R}
{CODE}

{R(X11=1)}
x<-c(11:20)
y <- x*x
plot(x,y)
{R}

-==-

!!# X11 param as 0
Force to use dev2bitmap (assuming R has no support for producing jpeg and png through X11)

{CODE()}
{R(X11=0)}
x<-c(11:20)
y <- x*x
plot(x,y)
{R}
{CODE}

{R(X11=0)}
x<-c(11:20)
y <- x*x
plot(x,y)
{R}


        

History

Information Version
Sat 31 of Aug, 2013 08:31 GMT-0000 Xavier de Pedro added echo to 2nd part 15
Fri 31 of May, 2013 10:04 GMT-0000 Xavier de Pedro added echo param 14
Sun 24 of Mar, 2013 23:45 GMT-0000 Xavier de Pedro simplified 13
Wed 01 of Dec, 2010 23:12 GMT-0000 Xavier de Pedro updated to latest pluginRR 12
Wed 01 of Sep, 2010 16:51 GMT-0000 Xavier de Pedro updated the path for temp graphs to be saved, with latest PluginR 11
Tue 08 of Jun, 2010 17:37 GMT-0000 Xavier de Pedro 10
Tue 08 of Jun, 2010 17:26 GMT-0000 Xavier de Pedro 9
Tue 08 of Jun, 2010 17:24 GMT-0000 Xavier de Pedro 8
Tue 08 of Jun, 2010 17:24 GMT-0000 Xavier de Pedro added cases with new X11 param 7
Tue 08 of Jun, 2010 06:28 GMT-0000 Xavier de Pedro 6
Tue 08 of Jun, 2010 06:27 GMT-0000 Xavier de Pedro 5
Tue 08 of Jun, 2010 06:26 GMT-0000 Xavier de Pedro 4
Tue 08 of Jun, 2010 06:14 GMT-0000 Xavier de Pedro fixed the typo, security=2 is security=2! (current PluginR code is fine :-) 3
Tue 08 of Jun, 2010 06:13 GMT-0000 Xavier de Pedro 2
Mon 07 of Jun, 2010 19:32 GMT-0000 Xavier de Pedro 1