From 4a85f6e8769b7e15fe3911c79ba21b4da44af270 Mon Sep 17 00:00:00 2001 From: gluc Date: Tue, 6 Mar 2018 21:23:22 +0000 Subject: [PATCH] fixed DiagrammeR problems --- DESCRIPTION | 6 +++--- NEWS | 4 ++-- R/visualize.R | 4 ++-- man/AhpMatrix.Rd | 1 - man/Analyze.Rd | 1 - man/Calculate.Rd | 1 - man/GetPairwiseFromFunction.Rd | 1 - man/Load.Rd | 1 - man/PrioritiesFromPairwiseMatrixEigenvalues.Rd | 3 +-- man/PrioritiesFromScoresDefault.Rd | 1 - man/RunGUI.Rd | 1 - man/Visualize.Rd | 13 ++++++------- man/ahp.Rd | 1 - 13 files changed, 14 insertions(+), 24 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e64104d..ace35e7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: ahp Type: Package Title: Analytic Hierarchy Process -Version: 0.2.11 -Date: 2017-01-05 +Version: 0.2.12 +Date: 2018-03-06 Author: Christoph Glur Maintainer: Christoph Glur VignetteBuilder: knitr @@ -27,4 +27,4 @@ URL: http://github.com/gluc/ahp BugReports: http://github.com/gluc/ahp/issues Depends: R (>= 3.2.0) -RoxygenNote: 5.0.1 +RoxygenNote: 6.0.1 diff --git a/NEWS b/NEWS index 028b985..6efaa2b 100644 --- a/NEWS +++ b/NEWS @@ -1,8 +1,8 @@ # All changes to ahp are documented here. -## Version 0.2.12 (in progress) +## Version 0.2.12 (CRAN) - FIX: Visualize fontcolor of criteria nodes is now black - +- FIX: Fixed problems relating to DiagrammeR changes ## Version 0.2.11 (CRAN) - IMPROVE: Update to latest DiagrammeR updates diff --git a/R/visualize.R b/R/visualize.R index 4d2eb55..f1abc13 100644 --- a/R/visualize.R +++ b/R/visualize.R @@ -82,8 +82,8 @@ GetGraph <- function(ahpTree, edges <- DiagrammeR::combine_edfs(edges, edgesAlt, edgesAlts) - graph <- DiagrammeR::create_graph(nodes, edges) - graph <- DiagrammeR::set_global_graph_attrs(graph, "rankdir", "TB", "graph") + graph <- DiagrammeR::create_graph(nodes, edges, attr_theme = NULL) + graph <- DiagrammeR::add_global_graph_attrs(graph, "rankdir", "TB", "graph") return (graph) } diff --git a/man/AhpMatrix.Rd b/man/AhpMatrix.Rd index d47dc6a..57a4246 100644 --- a/man/AhpMatrix.Rd +++ b/man/AhpMatrix.Rd @@ -18,4 +18,3 @@ an AHP preference matrix Create the AHP preference matrix from a dataframe containing the pairwiswe preferences. } - diff --git a/man/Analyze.Rd b/man/Analyze.Rd index 765afa1..83c726e 100644 --- a/man/Analyze.Rd +++ b/man/Analyze.Rd @@ -83,4 +83,3 @@ AnalyzeTable( ) } - diff --git a/man/Calculate.Rd b/man/Calculate.Rd index 12799fc..77d6858 100644 --- a/man/Calculate.Rd +++ b/man/Calculate.Rd @@ -18,4 +18,3 @@ the pairwise preference matrix.} \description{ Calculate the Ahp tree } - diff --git a/man/GetPairwiseFromFunction.Rd b/man/GetPairwiseFromFunction.Rd index 0645d8d..17b86ac 100644 --- a/man/GetPairwiseFromFunction.Rd +++ b/man/GetPairwiseFromFunction.Rd @@ -12,4 +12,3 @@ GetPairwiseFromFunction(node) \description{ Create table from function } - diff --git a/man/Load.Rd b/man/Load.Rd index b5be93e..90f0a3e 100644 --- a/man/Load.Rd +++ b/man/Load.Rd @@ -42,4 +42,3 @@ cat(readChar(ahpFile, file.info(ahpFile)$size)) carAhp <- Load(ahpFile) } - diff --git a/man/PrioritiesFromPairwiseMatrixEigenvalues.Rd b/man/PrioritiesFromPairwiseMatrixEigenvalues.Rd index d7133ef..4029f90 100644 --- a/man/PrioritiesFromPairwiseMatrixEigenvalues.Rd +++ b/man/PrioritiesFromPairwiseMatrixEigenvalues.Rd @@ -2,8 +2,8 @@ % Please edit documentation in R/ahp_functions.R \name{PrioritiesFromPairwiseMatrixEigenvalues} \alias{PrioritiesFromPairwiseMatrixEigenvalues} -\alias{PrioritiesFromPairwiseMatrixGeometricMean} \alias{PrioritiesFromPairwiseMatrixMeanNormalization} +\alias{PrioritiesFromPairwiseMatrixGeometricMean} \title{Calculate the ahp priority weights from the AHP matrix.} \usage{ PrioritiesFromPairwiseMatrixEigenvalues(mat, allowedConsistency = 1) @@ -25,4 +25,3 @@ the ahp preference weights For a comparison of different methods, see for example \bold{How to derive priorities in AHP: a comparative study}, by Alessio Ishizaka and Markus Lusti, as available here: http://eprints.port.ac.uk/9041/1/filetodownload,70633,en.pdf } - diff --git a/man/PrioritiesFromScoresDefault.Rd b/man/PrioritiesFromScoresDefault.Rd index 63e87a2..fc2d7f1 100644 --- a/man/PrioritiesFromScoresDefault.Rd +++ b/man/PrioritiesFromScoresDefault.Rd @@ -17,4 +17,3 @@ While pure AHP limits itself to pairwise preferences, scoring alternatives on an arbitrary scale is often much less time consuming in practice. This method calculates the priority weight as \code{score / sum(scores)} } - diff --git a/man/RunGUI.Rd b/man/RunGUI.Rd index 08b53ac..a758880 100644 --- a/man/RunGUI.Rd +++ b/man/RunGUI.Rd @@ -15,4 +15,3 @@ use a random port.} \description{ Shows a GUI (Graphical User Interface) that lets you specify AHP models and view the results. } - diff --git a/man/Visualize.Rd b/man/Visualize.Rd index eea0e51..fb19463 100644 --- a/man/Visualize.Rd +++ b/man/Visualize.Rd @@ -1,17 +1,17 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/visualize.R \name{Visualize} -\alias{GetGraph} \alias{Visualize} +\alias{GetGraph} \title{Draw a diagram of the AHP tree.} \usage{ Visualize(ahpTree, criteriaNodesStyle = list(style = "filled,rounded", shape = "box", color = "honeydew4", fillcolor = "honeydew", penwidth = 4, fontname = - "helvetica"), alternativeNodesStyle = list(style = "filled,rounded", shape = - "box", color = "thistle4", fillcolor = "thistle", penwidth = 4, fontname = - "helvetica"), criteriaEdgesStyle = list(arrowhead = "vee", color = "grey35", - penwidth = 2), alternativeEdgesStyle = list(dir = "none", color = "grey35", - penwidth = 2)) + "helvetica", fontcolor = "black"), alternativeNodesStyle = list(style = + "filled,rounded", shape = "box", color = "thistle4", fillcolor = "thistle", + penwidth = 4, fontname = "helvetica"), criteriaEdgesStyle = list(arrowhead = + "vee", color = "grey35", penwidth = 2), alternativeEdgesStyle = list(dir = + "none", color = "grey35", penwidth = 2)) GetGraph(ahpTree, criteriaNodesStyle = list(style = "filled,rounded", shape = "box", color = "honeydew4", fillcolor = "honeydew", penwidth = 4, fontname = @@ -36,4 +36,3 @@ GetGraph(ahpTree, criteriaNodesStyle = list(style = "filled,rounded", shape = The function uses graphviz via DiagrammeR. For details on styling, refer to these. } - diff --git a/man/ahp.Rd b/man/ahp.Rd index 2aee12b..634ef1d 100644 --- a/man/ahp.Rd +++ b/man/ahp.Rd @@ -50,4 +50,3 @@ Saaty, T. L. (2001). Decision Making for Leaders: The Analytic Hierarchy Process for Decisions in a Complex World, New Edition 2001 (3 Revised). Pittsburgh, PA: RWS Publications, ISBN 978-0962031786. } -