complecs | R Documentation |
COMPLECS was developed to help make sense of complex systems. It reads data from a number of worksheets in a spreadsheet and generates a diagram according to those specifications. Originally, COMPLECS was developed to visualise a problem during the needs assessment phase of intervention development.
complecs( input, title = "COMPLECS overview", layout = "fdp", graph_styling = list(c("outputorder", "edgesfirst", "graph"), c("overlap", "false", "graph"), c("fixedsize", "false", "node"), c("fontname", "Arial", "graph"), c("fontname", "Arial", "node"), c("fontname", "Arial", "edge"), c("headclip", "true", "edge"), c("tailclip", "false", "edge")), directed = TRUE, outputFile = NULL, outputWidth = 1600, outputHeight = NULL, returnDotOnly = FALSE, returnSvgOnly = FALSE, returnGraphOnly = TRUE, maxLabelLength = 20, regExReplacements = opts$get("diagrammerSanitization"), silent = opts$get("silent") ) ## S3 method for class 'complecs' print( x, width = x$input$width, height = x$input$height, title = DiagrammeR::get_graph_name(x$output$graph), ... ) ## S3 method for class 'complecs' print( x, width = x$input$width, height = x$input$height, title = DiagrammeR::get_graph_name(x$output$graph), ... )
input |
Either a link to a Google Sheet, or a path to an Excel file. |
title |
The title of the COMPLECS graph. |
layout |
The layout to use; has to be one of the |
graph_styling |
Additional styling to apply; a list with three-element
vectors, where the three elements correspond to, respectively, the |
directed |
Whether to draw directed arrows or not. |
outputFile |
A character vector where each element is one path (including filename) to write the graph to. |
outputWidth, outputHeight |
If not |
returnDotOnly |
Whether to only return the produced DOT code. |
returnSvgOnly |
Whether to only return the SVG in a character vector. |
returnGraphOnly |
Whether to only return the produced graph. |
maxLabelLength |
The number of characters where to wrap the labels. |
regExReplacements |
A list of pairs of regular expressions that will be applied to the specifications before generating the ABCD. This can be used to sanitize problematic characters (e.g. ', " and \). |
silent |
Whether to be chatty or silent. |
x |
The object to print (i.e. a result of a call to |
width, height |
If not |
... |
Any additional arguments for the |
COMPLECS is a recursive acronym for COMPLECS Organises Multiple Players & Linked Environments using Connected Specifications.
A complecs
object that includes the graph and the graph in SVG in
output$graph
and output$graphSvg
.
## Not run: ### Path in the package with example COMPLECS exampleCOMPLECS <- system.file( "extdata", "COMPLECS-spec-example.xlsx", package = "behaviorchange" ); behaviorchange::complecs( exampleCOMPLECS ); ### Loading that COMPLECS from a google sheet - but note that ### this requires an internet connection! behaviorchange::complecs( paste0( "https://docs.google.com/spreadsheets/d/", "1WMO15xroy4a0RfpuZ8GhT-NfDoxwS34w9PrWp8rGjjk" ) ); ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.