Skip to content

Commit

Permalink
fixed bug in plot.FFTrees(). bumped version to 1.6.6
Browse files Browse the repository at this point in the history
  • Loading branch information
ndphillips committed Jul 18, 2022
1 parent 12c46e7 commit 6b50730
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: FFTrees
Type: Package
Title: Generate, Visualise, and Evaluate Fast-and-Frugal Decision Trees
Version: 1.6.5
Date: 2022-07-17
Version: 1.6.6
Date: 2022-07-18
Authors@R: c(person("Nathaniel", "Phillips", role = c("aut", "cre"),
email = "Nathaniel.D.Phillips.is@gmail.com"),
person("Hansjoerg", "Neth", role = "aut"),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.6.6

* Fixed bug causing `plot.FFTrees()` to not display plots properly.

# 1.6.5

* Cleanup to get package back on CRAN after failed submission on July 17, 2022
Expand Down
9 changes: 4 additions & 5 deletions R/plotFFTrees_function.R
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,6 @@ plot.FFTrees <- function(x = NULL,

# DEFINE CRITICAL OBJECTS



decision.v <- x$trees$decisions[[data]][[tree]]$decision
tree.stats <- x$trees$stats[[data]]
level.stats <- x$trees$level_stats[[data]][x$trees$level_stats[[data]]$tree == tree, ]
Expand Down Expand Up @@ -840,6 +838,7 @@ plot.FFTrees <- function(x = NULL,
# -------------------------
# 2. TREE
# --------------------------

if (show.middle) {
if (show.top == FALSE & show.bottom == FALSE) {
par(mar = c(3, 3, 3, 3) + .1)
Expand All @@ -857,7 +856,6 @@ plot.FFTrees <- function(x = NULL,
ylab = "", xlab = ""
)


# Add frame

par(xpd = TRUE)
Expand Down Expand Up @@ -1282,14 +1280,15 @@ plot.FFTrees <- function(x = NULL,
# Update plot center
# -----------------------
{
if (identical(level.stats$exit[level.i], 0)) {

if (identical(paste(level.stats$exit[level.i]), "0")) {
subplot.center <- c(
subplot.center[1] + 2,
subplot.center[2] - 4
)
}

if (identical(level.stats$exit[level.i], 1)) {
if (identical(paste(level.stats$exit[level.i]), "1")) {
subplot.center <- c(
subplot.center[1] - 2,
subplot.center[2] - 4
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# FFTrees 1.6.5
# FFTrees 1.6.6

[![Build
Status](https://travis-ci.org/ndphillips/FFTrees.svg?branch=master)](https://travis-ci.org/ndphillips/FFTrees)
Expand Down Expand Up @@ -38,7 +38,7 @@ library(FFTrees)
#> / \
#> F O
#> / \
#> F Trees 1.6.5
#> F Trees 1.6.6
#>
#> Email: Nathaniel.D.Phillips.is@gmail.com
#> FFTrees.guide() opens the main guide.
Expand Down
Binary file modified man/figures/README-example-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-unnamed-chunk-5-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6b50730

Please sign in to comment.