Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > ## use shift-cmd-t to run all tests
  > library(testthat)
  > test_check("radiant.model")
  Loading required package: radiant.model
  Loading required package: radiant.data
  Loading required package: magrittr
  
  Attaching package: 'magrittr'
  
  The following objects are masked from 'package:testthat':
  
      equals, is_less_than, not
  
  Loading required package: ggplot2
  Loading required package: lubridate
  
  Attaching package: 'lubridate'
  
  The following object is masked from 'package:base':
  
      date
  
  Loading required package: tidyr
  
  Attaching package: 'tidyr'
  
  The following object is masked from 'package:magrittr':
  
      extract
  
  Loading required package: dplyr
  
  Attaching package: 'dplyr'
  
  The following objects are masked from 'package:lubridate':
  
      intersect, setdiff, union
  
  The following object is masked from 'package:testthat':
  
      matches
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  
  Attaching package: 'radiant.data'
  
  The following objects are masked from 'package:lubridate':
  
      month, wday
  
  The following object is masked from 'package:ggplot2':
  
      diamonds
  
  The following object is masked from 'package:testthat':
  
      describe
  
  ── 1. Error: regress (@test_stats.R#7)  ────────────────────────────────────────
  Dataset diamonds is not available. Please load the dataset
  1: regress("diamonds", "price", c("carat", "clarity")) at testthat/test_stats.R:7
  2: getdata(dataset, c(rvar, evar), filt = data_filter)
  3: get_data(...)
  4: {
         if (is.data.frame(dataset)) {
             dataset
         }
         else if (exists("r_environment") && exists("r_data") && !is.null(r_data[[dataset]])) {
             r_data[[dataset]]
         }
         else {
             paste0("Dataset ", dataset, " is not available. Please load the dataset") %>% 
                 stop(call. = FALSE)
         }
     } %>% {
         if ("grouped_df" %in% class(.)) 
             ungroup(.)
         else .
     } %>% {
         if (filt == "") 
             .
         else filter_data(., filt)
     } %>% {
         if (is.null(rows)) 
             .
         else .[rows, , drop = FALSE]
     } %>% {
         if (is_empty(vars[1])) 
             .
         else select(., !!!if (any(grepl(":", vars))) 
             rlang::parse_exprs(paste0(vars, collapse = ";"))
         else vars)
     } %>% {
         if (na.rm) 
             na.omit(.)
         else .
     }
  5: eval(lhs, parent, parent)
  6: eval(lhs, parent, parent)
  7: paste0("Dataset ", dataset, " is not available. Please load the dataset") %>% stop(call. = FALSE)
  8: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  9: eval(quote(`_fseq`(`_lhs`)), env, env)
  10: eval(quote(`_fseq`(`_lhs`)), env, env)
  11: `_fseq`(`_lhs`)
  12: freduce(value, `_function_list`)
  13: withVisible(function_list[[k]](value))
  14: function_list[[k]](value)
  15: stop(., call. = FALSE)
  
  ── 2. Error: regress - predict (@test_stats.R#21)  ─────────────────────────────
  Dataset diamonds is not available. Please load the dataset
  1: regress("diamonds", "price", c("carat", "clarity")) at testthat/test_stats.R:21
  2: getdata(dataset, c(rvar, evar), filt = data_filter)
  3: get_data(...)
  4: {
         if (is.data.frame(dataset)) {
             dataset
         }
         else if (exists("r_environment") && exists("r_data") && !is.null(r_data[[dataset]])) {
             r_data[[dataset]]
         }
         else {
             paste0("Dataset ", dataset, " is not available. Please load the dataset") %>% 
                 stop(call. = FALSE)
         }
     } %>% {
         if ("grouped_df" %in% class(.)) 
             ungroup(.)
         else .
     } %>% {
         if (filt == "") 
             .
         else filter_data(., filt)
     } %>% {
         if (is.null(rows)) 
             .
         else .[rows, , drop = FALSE]
     } %>% {
         if (is_empty(vars[1])) 
             .
         else select(., !!!if (any(grepl(":", vars))) 
             rlang::parse_exprs(paste0(vars, collapse = ";"))
         else vars)
     } %>% {
         if (na.rm) 
             na.omit(.)
         else .
     }
  5: eval(lhs, parent, parent)
  6: eval(lhs, parent, parent)
  7: paste0("Dataset ", dataset, " is not available. Please load the dataset") %>% stop(call. = FALSE)
  8: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  9: eval(quote(`_fseq`(`_lhs`)), env, env)
  10: eval(quote(`_fseq`(`_lhs`)), env, env)
  11: `_fseq`(`_lhs`)
  12: freduce(value, `_function_list`)
  13: withVisible(function_list[[k]](value))
  14: function_list[[k]](value)
  15: stop(., call. = FALSE)
  
  ── 3. Error: logistic (@test_stats.R#29)  ──────────────────────────────────────
  Dataset titanic is not available. Please load the dataset
  1: logistic("titanic", "survived", c("pclass", "sex")) at testthat/test_stats.R:29
  2: getdata(dataset, vars, filt = data_filter)
  3: get_data(...)
  4: {
         if (is.data.frame(dataset)) {
             dataset
         }
         else if (exists("r_environment") && exists("r_data") && !is.null(r_data[[dataset]])) {
             r_data[[dataset]]
         }
         else {
             paste0("Dataset ", dataset, " is not available. Please load the dataset") %>% 
                 stop(call. = FALSE)
         }
     } %>% {
         if ("grouped_df" %in% class(.)) 
             ungroup(.)
         else .
     } %>% {
         if (filt == "") 
             .
         else filter_data(., filt)
     } %>% {
         if (is.null(rows)) 
             .
         else .[rows, , drop = FALSE]
     } %>% {
         if (is_empty(vars[1])) 
             .
         else select(., !!!if (any(grepl(":", vars))) 
             rlang::parse_exprs(paste0(vars, collapse = ";"))
         else vars)
     } %>% {
         if (na.rm) 
             na.omit(.)
         else .
     }
  5: eval(lhs, parent, parent)
  6: eval(lhs, parent, parent)
  7: paste0("Dataset ", dataset, " is not available. Please load the dataset") %>% stop(call. = FALSE)
  8: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  9: eval(quote(`_fseq`(`_lhs`)), env, env)
  10: eval(quote(`_fseq`(`_lhs`)), env, env)
  11: `_fseq`(`_lhs`)
  12: freduce(value, `_function_list`)
  13: withVisible(function_list[[k]](value))
  14: function_list[[k]](value)
  15: stop(., call. = FALSE)
  
  ── 4. Error: logistic - predict (@test_stats.R#37)  ────────────────────────────
  Dataset titanic is not available. Please load the dataset
  1: logistic("titanic", "survived", c("pclass", "sex")) at testthat/test_stats.R:37
  2: getdata(dataset, vars, filt = data_filter)
  3: get_data(...)
  4: {
         if (is.data.frame(dataset)) {
             dataset
         }
         else if (exists("r_environment") && exists("r_data") && !is.null(r_data[[dataset]])) {
             r_data[[dataset]]
         }
         else {
             paste0("Dataset ", dataset, " is not available. Please load the dataset") %>% 
                 stop(call. = FALSE)
         }
     } %>% {
         if ("grouped_df" %in% class(.)) 
             ungroup(.)
         else .
     } %>% {
         if (filt == "") 
             .
         else filter_data(., filt)
     } %>% {
         if (is.null(rows)) 
             .
         else .[rows, , drop = FALSE]
     } %>% {
         if (is_empty(vars[1])) 
             .
         else select(., !!!if (any(grepl(":", vars))) 
             rlang::parse_exprs(paste0(vars, collapse = ";"))
         else vars)
     } %>% {
         if (na.rm) 
             na.omit(.)
         else .
     }
  5: eval(lhs, parent, parent)
  6: eval(lhs, parent, parent)
  7: paste0("Dataset ", dataset, " is not available. Please load the dataset") %>% stop(call. = FALSE)
  8: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  9: eval(quote(`_fseq`(`_lhs`)), env, env)
  10: eval(quote(`_fseq`(`_lhs`)), env, env)
  11: `_fseq`(`_lhs`)
  12: freduce(value, `_function_list`)
  13: withVisible(function_list[[k]](value))
  14: function_list[[k]](value)
  15: stop(., call. = FALSE)
  
  ── 5. Error: ann - predict for classification (@test_stats.R#50)  ──────────────
  Dataset titanic is not available. Please load the dataset
  1: ann("titanic", "survived", c("pclass", "sex"), seed = 1234) at testthat/test_stats.R:50
  2: getdata(dataset, vars, filt = data_filter)
  3: get_data(...)
  4: {
         if (is.data.frame(dataset)) {
             dataset
         }
         else if (exists("r_environment") && exists("r_data") && !is.null(r_data[[dataset]])) {
             r_data[[dataset]]
         }
         else {
             paste0("Dataset ", dataset, " is not available. Please load the dataset") %>% 
                 stop(call. = FALSE)
         }
     } %>% {
         if ("grouped_df" %in% class(.)) 
             ungroup(.)
         else .
     } %>% {
         if (filt == "") 
             .
         else filter_data(., filt)
     } %>% {
         if (is.null(rows)) 
             .
         else .[rows, , drop = FALSE]
     } %>% {
         if (is_empty(vars[1])) 
             .
         else select(., !!!if (any(grepl(":", vars))) 
             rlang::parse_exprs(paste0(vars, collapse = ";"))
         else vars)
     } %>% {
         if (na.rm) 
             na.omit(.)
         else .
     }
  5: eval(lhs, parent, parent)
  6: eval(lhs, parent, parent)
  7: paste0("Dataset ", dataset, " is not available. Please load the dataset") %>% stop(call. = FALSE)
  8: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  9: eval(quote(`_fseq`(`_lhs`)), env, env)
  10: eval(quote(`_fseq`(`_lhs`)), env, env)
  11: `_fseq`(`_lhs`)
  12: freduce(value, `_function_list`)
  13: withVisible(function_list[[k]](value))
  14: function_list[[k]](value)
  15: stop(., call. = FALSE)
  
  ── 6. Error: ann - predict for regression (@test_stats.R#63)  ──────────────────
  Dataset diamonds is not available. Please load the dataset
  1: ann("diamonds", "price", c("carat", "clarity"), type = "regression", seed = 1234) at testthat/test_stats.R:63
  2: getdata(dataset, vars, filt = data_filter)
  3: get_data(...)
  4: {
         if (is.data.frame(dataset)) {
             dataset
         }
         else if (exists("r_environment") && exists("r_data") && !is.null(r_data[[dataset]])) {
             r_data[[dataset]]
         }
         else {
             paste0("Dataset ", dataset, " is not available. Please load the dataset") %>% 
                 stop(call. = FALSE)
         }
     } %>% {
         if ("grouped_df" %in% class(.)) 
             ungroup(.)
         else .
     } %>% {
         if (filt == "") 
             .
         else filter_data(., filt)
     } %>% {
         if (is.null(rows)) 
             .
         else .[rows, , drop = FALSE]
     } %>% {
         if (is_empty(vars[1])) 
             .
         else select(., !!!if (any(grepl(":", vars))) 
             rlang::parse_exprs(paste0(vars, collapse = ";"))
         else vars)
     } %>% {
         if (na.rm) 
             na.omit(.)
         else .
     }
  5: eval(lhs, parent, parent)
  6: eval(lhs, parent, parent)
  7: paste0("Dataset ", dataset, " is not available. Please load the dataset") %>% stop(call. = FALSE)
  8: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  9: eval(quote(`_fseq`(`_lhs`)), env, env)
  10: eval(quote(`_fseq`(`_lhs`)), env, env)
  11: `_fseq`(`_lhs`)
  12: freduce(value, `_function_list`)
  13: withVisible(function_list[[k]](value))
  14: function_list[[k]](value)
  15: stop(., call. = FALSE)
  
  ── 7. Error: regress - plots (@test_stats.R#76)  ───────────────────────────────
  Dataset diamonds is not available. Please load the dataset
  1: regress("diamonds", "price", c("carat", "clarity")) at testthat/test_stats.R:76
  2: getdata(dataset, c(rvar, evar), filt = data_filter)
  3: get_data(...)
  4: {
         if (is.data.frame(dataset)) {
             dataset
         }
         else if (exists("r_environment") && exists("r_data") && !is.null(r_data[[dataset]])) {
             r_data[[dataset]]
         }
         else {
             paste0("Dataset ", dataset, " is not available. Please load the dataset") %>% 
                 stop(call. = FALSE)
         }
     } %>% {
         if ("grouped_df" %in% class(.)) 
             ungroup(.)
         else .
     } %>% {
         if (filt == "") 
             .
         else filter_data(., filt)
     } %>% {
         if (is.null(rows)) 
             .
         else .[rows, , drop = FALSE]
     } %>% {
         if (is_empty(vars[1])) 
             .
         else select(., !!!if (any(grepl(":", vars))) 
             rlang::parse_exprs(paste0(vars, collapse = ";"))
         else vars)
     } %>% {
         if (na.rm) 
             na.omit(.)
         else .
     }
  5: eval(lhs, parent, parent)
  6: eval(lhs, parent, parent)
  7: paste0("Dataset ", dataset, " is not available. Please load the dataset") %>% stop(call. = FALSE)
  8: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  9: eval(quote(`_fseq`(`_lhs`)), env, env)
  10: eval(quote(`_fseq`(`_lhs`)), env, env)
  11: `_fseq`(`_lhs`)
  12: freduce(value, `_function_list`)
  13: withVisible(function_list[[k]](value))
  14: function_list[[k]](value)
  15: stop(., call. = FALSE)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 7 SKIPPED: 0 FAILED: 7
  1. Error: regress (@test_stats.R#7) 
  2. Error: regress - predict (@test_stats.R#21) 
  3. Error: logistic (@test_stats.R#29) 
  4. Error: logistic - predict (@test_stats.R#37) 
  5. Error: ann - predict for classification (@test_stats.R#50) 
  6. Error: ann - predict for regression (@test_stats.R#63) 
  7. Error: regress - plots (@test_stats.R#76) 
  
  Error: testthat unit tests failed
  Execution halted