Loading...
 

Profile_r_test8_customoutput

Testing the customoutput parameter, introduced in PluginR v0.87, to produce no hardcoded graphical output from PluginR, but leave the r script inside the plugin to manage chart generation. In a later step, image is displayed with either img for images, or mediaplayer for pdf's, videos, etc.

{RR(echo="1", customoutput="1", cacheby="pagename")}
  1. Derived from http://www.r-bloggers.com/why-i-use-ggplot2/
if(!require(ggplot2)){ install.packages("ggplot2", lib="/usr/lib/R/site-library", repos="http://ftp.heanet.ie/mirrors/cran.r-project.org/") }
if(!require(grid)){ install.packages("grid", lib="/usr/lib/R/site-library", repos="http://ftp.heanet.ie/mirrors/cran.r-project.org/") }
if(!require(dplyr)){ install.packages("dplyr", lib="/usr/lib/R/site-library", repos="http://ftp.heanet.ie/mirrors/cran.r-project.org/") }

library(ggplot2)
library(grid)
library(dplyr)

tmpfile <- download.file("http://varianceexplained.org/files/ggplot2_example.rda", destfile="ggplot2_example.rda")
load("ggplot2_example.rda")
top_data <- cleaned_data No value assigned
semi_join(top_intercept, by = "systematic_name")
g2 <- ggplot(top_data, aes(rate, expression, color = nutrient)) +
geom_point() +
geom_smooth(method = "lm", se = FALSE) +
facet_wrap(~name + systematic_name, scales = "free_y")
png("testr.png", width=800, height = 1000)
grid.draw(g2)
invisible(dev.off())
{RR}

{img src="temp/cache/{{domainslash_if_multitiki}}R_{{page}}/testr.png"}

Image

{RR(echo="1", customoutput="1", cacheby="pagename")}
  1. Derived from http://www.r-bloggers.com/why-i-use-ggplot2/
if(!require(ggplot2)){ install.packages("ggplot2", lib="/usr/lib/R/site-library", repos="http://ftp.heanet.ie/mirrors/cran.r-project.org/") }
if(!require(grid)){ install.packages("grid", lib="/usr/lib/R/site-library", repos="http://ftp.heanet.ie/mirrors/cran.r-project.org/") }
if(!require(dplyr)){ install.packages("dplyr", lib="/usr/lib/R/site-library", repos="http://ftp.heanet.ie/mirrors/cran.r-project.org/") }

library(ggplot2)
library(grid)
library(dplyr)

tmpfile <- download.file("http://varianceexplained.org/files/ggplot2_example.rda", destfile="ggplot2_example.rda")
load("ggplot2_example.rda")
top_data <- cleaned_data No value assigned
semi_join(top_intercept, by = "systematic_name")
g2 <- ggplot(top_data, aes(rate, expression, color = nutrient)) +
geom_point() +
geom_smooth(method = "lm", se = FALSE) +
facet_wrap(~name + systematic_name, scales = "free_y")
pdf("testr.pdf", width=800, height = 1000)
grid.draw(g2)
invisible(dev.off())
{RR}

{mediaplayer fullscreen="true" src="temp/cache/{{domainslash_if_multitiki}}R_{{page}}/testr.pdf" width="100%" height="600px" style="normal" wmode="transparent"}

 Plugin disabled

Plugin mediaplayer cannot be executed.