Profile_r_test4
Table of contents
1. Testing that basic R works
{R()}1:10{R}{R()}1:10{R}
2. Testing that basic plotting works
{R()}x<-c(1:10)
y <- x*x
plot(x,y)
{R}{R()}x<-c(1:10)
y <- x*x
plot(x,y)
{R}
3. Testing security
3.1. 1 banned command (png) used in PluginR
{R()}x<-c(1:20)
y <- x*x
png(filename = "temp/cache/mytest_20.png");
plot(x,y)
{R}{R()}x<-c(1:20)
y <- x*x
png(filename = "temp/cache/mytest_20.png");
plot(x,y)
{R}
^{img src=temp/cache/mytest_20.png}^
3.2. 1 banned command (png) used in PluginRR
Forced mode to disallow security checking, so that banned commands can be executed.{RR()}x<-c(1:40)
y <- x*x
png(filename = "temp/cache/mytest_30.png");
plot(x,y)
{RR}{RR()}x<-c(1:40)
y <- x*x
png(filename = "temp/cache/mytest_30.png");
plot(x,y)
{RR}
^{img src=temp/cache/mytest_30.png}^
4. Testing with X11 parameter
4.1. X11 param as 1
{R(X11=1)}
x<-c(21:100)
y <- x*x
plot(x,y)
{R}{R(X11=1)}
x<-c(21:100)
y <- x*x
plot(x,y)
{R}
4.2. X11 param as 0
Force to use dev2bitmap (assuming R has no support for producing jpeg and png through X11){R(X11=0)}
x<-c(21:100)
y <- x*x
plot(x,y)
{R}{R(X11=0)}
x<-c(21:100)
y <- x*x
plot(x,y)
{R}
