History: Profile_r_test4_export
Source of version: 12
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 security !!# 1 banned command (png) used in PluginR {CODE()} {R()}x<-c(1:20) y <- x*x png(filename = "temp/cache/mytest_20.png"); plot(x,y) {R} {CODE} {R()}x<-c(1:20) y <- x*x png(filename = "temp/cache/mytest_20.png"); plot(x,y) {R} {CODE()} ^{img src=temp/cache/mytest_20.png}^ {CODE} ^{img src=temp/cache/mytest_20.png}^ -==- !!# 1 banned command (png) used in PluginRR Forced mode to disallow security checking, so that banned commands can be executed. {CODE()} {RR()}x<-c(1:40) y <- x*x png(filename = "temp/cache/mytest_30.png"); plot(x,y) {RR} {CODE} {RR()}x<-c(1:40) y <- x*x png(filename = "temp/cache/mytest_30.png"); plot(x,y) {RR} {CODE()} ^{img src=temp/cache/mytest_30.png}^ {CODE} ^{img src=temp/cache/mytest_30.png}^ !# Testing with X11 parameter !!# X11 param as 1 {CODE()} {R(X11=1)} x<-c(21:100) y <- x*x plot(x,y) {R} {CODE} {R(X11=1)} x<-c(21:100) 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(21:100) y <- x*x plot(x,y) {R} {CODE} {R(X11=0)} x<-c(21:100) y <- x*x plot(x,y) {R}