Exporting A Graph From The Execute R Script Operator
Hi Experts,
I would like to create a graph with a R-script and export it. The script and the export are working in R-Studio.
But I don't get anything in Rapidminer, is there a way to create a graph with the Execute R Script Operator, display the graph and export it?
<?xml version="1.0" encoding="UTF-8"?><process version="8.2.001">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="8.2.001" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="r_scripting:execute_r" compatibility="8.1.000" expanded="true" height="82" name="Execute R" width="90" x="313" y="34">
<parameter key="script" value="rm_main = function(data) { library(igraph) #setwd ('./home/knecht') g <- graph.empty(5, directed = FALSE) new_edges <- c(1,3, 1,5, 2,5, 4,5) g<- add.edges(g, new_edges) pdf("graph1010.pdf") plot(g) g <-add.vertices(g,1) g <-add.edges(g, c(6,5)) V(g)$name <- letters[1:vcount(g)] E(g)$weight <- runif(ecount(g)) get.adjacency(g, attr = "weight") print(g) return (g) } "/>
</operator>
<connect from_op="Execute R" from_port="output 1" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>
Best regards
Tobias