This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTML(glue("<script>$('#{id}').on('change',function(){{check_doublecolorpicker('{id}');}});</script>")), | |
HTML("<div class='warning' style='color:red;display:none'>Please choose more different colors</div>") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTML(glue("<script>$('#{id}').on('change',function(){{check_doublecolorpicker('{id}');}});</script>")), | |
HTML("<div class='warning' style='color:red;display:none'>Please choose more different colors</div>") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Function to check a doublecolorpicker | |
// item by id | |
function check_doublecolorpicker(id){ | |
// derive an empty array of two inputs with | |
// colors | |
values = []; | |
// push the two colors into the array | |
$("#"+id).find('input').each(function(item){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<RTestCase xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:noNamespaceSchemaLocation="../xsd/RTest.xsd"> | |
<ID>RTest_TC-medium</ID> | |
<synopsis> | |
<version>01</version> | |
<author>Sebastian Wolf</author> | |
<creation-date>2018-12-11</creation-date> | |
</synopsis> | |
<input-data> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<my_function test-desc="Test data.frame"> | |
<params> | |
<RTestData_input_data param="data" name="test01" /> | |
</params> | |
<reference> | |
<col-defs> | |
<coldef name="x" type="numeric" /><coldef name="y" type="numeric" /><coldef name="sum" type="numeric" /> | |
</col-defs> | |
<row> | |
<cell>1</cell><cell>2</cell><cell>3</cell> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input-data> | |
<data.frame name="test01"> | |
<col-defs> | |
<coldef name="x" type="numeric" /><coldef name="y" type="numeric" /> | |
</col-defs> | |
<row> | |
<cell>1</cell><cell>2</cell> | |
</row> | |
<row> | |
<cell>1</cell><cell>2</cell> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setClass("Report",representation(plots="list", filename="character", obs="numeric", rendered="logical")) | |
setMethod("pdfElement",signature = "Report",definition = function(object){ | |
tryCatch({ | |
pdf(object@filename) | |
lapply(object@plots,function(x){ | |
pdfElement(x) | |
}) | |
dev.off() | |
object@rendered <- TRUE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setClass("AnyPlot", representation(plot_element = "call")) | |
# constructor | |
AnyPlot <- function(plot_element=expr(plot(1,1))){ | |
new("AnyPlot", plot_element = plot_element) | |
} | |
setMethod("evalElement",signature = "AnyPlot",definition = function(object){ | |
eval(object@plot_element) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a reactive to create the Report object due to | |
# the chosen module | |
report_obj <- reactive({ | |
module <- unlist(lapply(configuration,function(x)x$name==input$modules)) | |
if(!any(module))module <- c(TRUE,FALSE) | |
do.call(configuration[[which(module)]][["class"]], | |
args=list( | |
obs = input$obs | |
)) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Observe PDF button and create PDF | |
observeEvent(input$"renderPDF",{ | |
# Create PDF | |
report <- pdfElement(report_obj()) | |
# If the PDF was successfully rendered update text message | |
if(report@rendered){ | |
output$renderedPDF <- renderText("PDF rendered") | |
}else{ |