Skip to content

Commit

Permalink
another try with tibble
Browse files Browse the repository at this point in the history
  • Loading branch information
mnwright committed Aug 6, 2018
1 parent 5b59bf6 commit 082024b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions tests/testthat/test_interface.R
Expand Up @@ -59,12 +59,10 @@ test_that("Error if interaction of factor variable included", {

# Tibbles
if (requireNamespace("tibble", quietly = TRUE)) {
library(tibble)
tb <- tibble::as_tibble(iris)
}

test_that("Training works with tibbles, formula interface", {
skip_if_not_installed("tibble")
tb <- as_tibble(iris)
set.seed(1000)
rf1 <- ranger(Species ~ ., tb, num.trees = 5)

Expand All @@ -80,7 +78,6 @@ test_that("Training works with tibbles, formula interface", {

test_that("Training works with tibbles, alternative interface", {
skip_if_not_installed("tibble")
tb <- as_tibble(iris)
set.seed(1000)
rf1 <- ranger(dependent.variable.name = "Species", data = tb, num.trees = 5)

Expand All @@ -96,7 +93,6 @@ test_that("Training works with tibbles, alternative interface", {

test_that("Prediction works with tibbles, formula interface", {
skip_if_not_installed("tibble")
tb <- as_tibble(iris)
set.seed(1000)
rf1 <- ranger(Species ~ ., tb, num.trees = 5)

Expand All @@ -119,7 +115,6 @@ test_that("Prediction works with tibbles, formula interface", {

test_that("Prediction works with tibbles, alternative interface", {
skip_if_not_installed("tibble")
tb <- as_tibble(iris)
set.seed(1000)
rf1 <- ranger(dependent.variable.name = "Species", data = tb, num.trees = 5)

Expand Down

0 comments on commit 082024b

Please sign in to comment.