Running ‘testthat.R’ [18s/19s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(circumplex)
  > 
  > test_check("circumplex")
  ── 1. Error: Single-group mean-based SSM results are correct (@test-ssm_analysis
  no applicable method for 'as_radian' applied to an object of class "c('double', 'numeric')"
  1: ssm_analyze(aw2009, PA:NO, octants()) at testthat/test-ssm_analysis.R:7
  2: ssm_analyze_means(.data, scales = !!scales_en, angles = angles, boots = boots, contrast = contrast, 
         interval = interval, listwise = listwise, call = call)
  3: ssm_bootstrap(bs_input = bs_input, bs_function = bs_function, angles = angles, boots = boots, 
         interval = interval, contrast = contrast, listwise = listwise, strata = bs_input$Group)
  4: bs_t %>% dplyr::mutate_at(.funs = as_radian, .vars = d_vars)
  5: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: `_fseq`(`_lhs`)
  9: freduce(value, `_function_list`)
  10: withVisible(function_list[[k]](value))
  11: function_list[[k]](value)
  12: dplyr::mutate_at(., .funs = as_radian, .vars = d_vars)
  13: mutate(.tbl, !!!funs)
  14: mutate.tbl_df(.tbl, !!!funs)
  15: mutate_impl(.data, dots, caller_env())
  16: (function (x, ...) 
     {
         UseMethod("as_radian")
     })(t5)
  
  ── 2. Error: Scale magnitudes greater than 5 trigger message (@test-ssm_analysis
  no applicable method for 'as_radian' applied to an object of class "c('double', 'numeric')"
  1: expect_message(ssm_analyze(aw2009a, PA:NO, octants()), "Your circumplex scales do not appear to be standardized*") at testthat/test-ssm_analysis.R:174
  2: quasi_capture(enquo(object), label, capture_messages)
  3: .capture(act$val <- eval_bare(get_expr(.quo), get_env(.quo)), ...)
  4: withCallingHandlers(code, message = function(condition) {
         out$push(condition)
         invokeRestart("muffleMessage")
     })
  5: eval_bare(get_expr(.quo), get_env(.quo))
  6: ssm_analyze(aw2009a, PA:NO, octants())
  7: ssm_analyze_means(.data, scales = !!scales_en, angles = angles, boots = boots, contrast = contrast, 
         interval = interval, listwise = listwise, call = call)
  8: ssm_bootstrap(bs_input = bs_input, bs_function = bs_function, angles = angles, boots = boots, 
         interval = interval, contrast = contrast, listwise = listwise, strata = bs_input$Group)
  9: bs_t %>% dplyr::mutate_at(.funs = as_radian, .vars = d_vars)
  10: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  11: eval(quote(`_fseq`(`_lhs`)), env, env)
  12: eval(quote(`_fseq`(`_lhs`)), env, env)
  13: `_fseq`(`_lhs`)
  14: freduce(value, `_function_list`)
  15: withVisible(function_list[[k]](value))
  16: function_list[[k]](value)
  17: dplyr::mutate_at(., .funs = as_radian, .vars = d_vars)
  18: mutate(.tbl, !!!funs)
  19: mutate.tbl_df(.tbl, !!!funs)
  20: mutate_impl(.data, dots, caller_env())
  21: (function (x, ...) 
     {
         UseMethod("as_radian")
     })(t5)
  
  ── 3. Error: Single-group correlation-based SSM results are correct (@test-ssm_a
  no applicable method for 'as_radian' applied to an object of class "c('double', 'numeric')"
  1: ssm_analyze(jz2017, PA:NO, octants(), measures = PARPD) at testthat/test-ssm_analysis.R:188
  2: ssm_analyze_corrs(.data, scales = !!scales_en, angles = angles, measures = !!measures_en, 
         contrast = contrast, boots = boots, interval = interval, listwise = listwise, 
         call = call)
  3: ssm_bootstrap(bs_input = bs_input, bs_function = bs_function, angles = angles, boots = boots, 
         interval = interval, contrast = contrast, listwise = listwise, strata = bs_input$Group)
  4: bs_t %>% dplyr::mutate_at(.funs = as_radian, .vars = d_vars)
  5: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: `_fseq`(`_lhs`)
  9: freduce(value, `_function_list`)
  10: withVisible(function_list[[k]](value))
  11: function_list[[k]](value)
  12: dplyr::mutate_at(., .funs = as_radian, .vars = d_vars)
  13: mutate(.tbl, !!!funs)
  14: mutate.tbl_df(.tbl, !!!funs)
  15: mutate_impl(.data, dots, caller_env())
  16: (function (x, ...) 
     {
         UseMethod("as_radian")
     })(t5)
  
  ── 4. Error: Single-group mean-based SSM plot is correct (@test-ssm_visualizatio
  no applicable method for 'as_radian' applied to an object of class "c('double', 'numeric')"
  1: ssm_analyze(aw2009, PA:NO, octants()) at testthat/test-ssm_visualization.R:5
  2: ssm_analyze_means(.data, scales = !!scales_en, angles = angles, boots = boots, contrast = contrast, 
         interval = interval, listwise = listwise, call = call)
  3: ssm_bootstrap(bs_input = bs_input, bs_function = bs_function, angles = angles, boots = boots, 
         interval = interval, contrast = contrast, listwise = listwise, strata = bs_input$Group)
  4: bs_t %>% dplyr::mutate_at(.funs = as_radian, .vars = d_vars)
  5: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: `_fseq`(`_lhs`)
  9: freduce(value, `_function_list`)
  10: withVisible(function_list[[k]](value))
  11: function_list[[k]](value)
  12: dplyr::mutate_at(., .funs = as_radian, .vars = d_vars)
  13: mutate(.tbl, !!!funs)
  14: mutate.tbl_df(.tbl, !!!funs)
  15: mutate_impl(.data, dots, caller_env())
  16: (function (x, ...) 
     {
         UseMethod("as_radian")
     })(t5)
  
  ── 5. Error: Single-group correlation-based SSM plot is correct (@test-ssm_visua
  no applicable method for 'as_radian' applied to an object of class "c('double', 'numeric')"
  1: ssm_analyze(jz2017, PA:NO, octants(), measures = PARPD) at testthat/test-ssm_visualization.R:17
  2: ssm_analyze_corrs(.data, scales = !!scales_en, angles = angles, measures = !!measures_en, 
         contrast = contrast, boots = boots, interval = interval, listwise = listwise, 
         call = call)
  3: ssm_bootstrap(bs_input = bs_input, bs_function = bs_function, angles = angles, boots = boots, 
         interval = interval, contrast = contrast, listwise = listwise, strata = bs_input$Group)
  4: bs_t %>% dplyr::mutate_at(.funs = as_radian, .vars = d_vars)
  5: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: `_fseq`(`_lhs`)
  9: freduce(value, `_function_list`)
  10: withVisible(function_list[[k]](value))
  11: function_list[[k]](value)
  12: dplyr::mutate_at(., .funs = as_radian, .vars = d_vars)
  13: mutate(.tbl, !!!funs)
  14: mutate.tbl_df(.tbl, !!!funs)
  15: mutate_impl(.data, dots, caller_env())
  16: (function (x, ...) 
     {
         UseMethod("as_radian")
     })(t5)
  
  ── 6. Error: Measure-contrast SSM plot is correct (@test-ssm_visualization.R#27)
  no applicable method for 'as_radian' applied to an object of class "c('double', 'numeric')"
  1: ssm_analyze(jz2017, PA:NO, octants(), measures = c(ASPD, NARPD), contrast = "test") at testthat/test-ssm_visualization.R:27
  2: ssm_analyze_corrs(.data, scales = !!scales_en, angles = angles, measures = !!measures_en, 
         contrast = contrast, boots = boots, interval = interval, listwise = listwise, 
         call = call)
  3: ssm_bootstrap(bs_input = bs_input, bs_function = bs_function, angles = angles, boots = boots, 
         interval = interval, contrast = contrast, listwise = listwise, strata = bs_input$Group)
  4: bs_t %>% dplyr::mutate_at(.funs = as_radian, .vars = d_vars)
  5: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: `_fseq`(`_lhs`)
  9: freduce(value, `_function_list`)
  10: withVisible(function_list[[k]](value))
  11: function_list[[k]](value)
  12: dplyr::mutate_at(., .funs = as_radian, .vars = d_vars)
  13: mutate(.tbl, !!!funs)
  14: mutate.tbl_df(.tbl, !!!funs)
  15: mutate_impl(.data, dots, caller_env())
  16: (function (x, ...) 
     {
         UseMethod("as_radian")
     })(t5)
  
  ── 7. Error: Group-contrast correlation-based SSM plot is correct (@test-ssm_vis
  no applicable method for 'as_radian' applied to an object of class "c('double', 'numeric')"
  1: ssm_analyze(jz2017, PA:NO, octants(), measures = NARPD, grouping = Gender, contrast = "test") at testthat/test-ssm_visualization.R:40
  2: ssm_analyze_corrs(.data, scales = !!scales_en, angles = angles, measures = !!measures_en, 
         grouping = !!grouping_en, contrast = contrast, boots = boots, interval = interval, 
         listwise = listwise, call = call)
  3: ssm_bootstrap(bs_input = bs_input, bs_function = bs_function, angles = angles, boots = boots, 
         interval = interval, contrast = contrast, listwise = listwise, strata = bs_input$Group)
  4: bs_t %>% dplyr::mutate_at(.funs = as_radian, .vars = d_vars)
  5: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: `_fseq`(`_lhs`)
  9: freduce(value, `_function_list`)
  10: withVisible(function_list[[k]](value))
  11: function_list[[k]](value)
  12: dplyr::mutate_at(., .funs = as_radian, .vars = d_vars)
  13: mutate(.tbl, !!!funs)
  14: mutate.tbl_df(.tbl, !!!funs)
  15: mutate_impl(.data, dots, caller_env())
  16: (function (x, ...) 
     {
         UseMethod("as_radian")
     })(t5)
  
  ── 8. Error: Removing plots with low fit works as expected (@test-ssm_visualizat
  no applicable method for 'as_radian' applied to an object of class "c('double', 'numeric')"
  1: ssm_analyze(jz2017, PA:NO, octants(), measures = OCPD) at testthat/test-ssm_visualization.R:54
  2: ssm_analyze_corrs(.data, scales = !!scales_en, angles = angles, measures = !!measures_en, 
         contrast = contrast, boots = boots, interval = interval, listwise = listwise, 
         call = call)
  3: ssm_bootstrap(bs_input = bs_input, bs_function = bs_function, angles = angles, boots = boots, 
         interval = interval, contrast = contrast, listwise = listwise, strata = bs_input$Group)
  4: bs_t %>% dplyr::mutate_at(.funs = as_radian, .vars = d_vars)
  5: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: `_fseq`(`_lhs`)
  9: freduce(value, `_function_list`)
  10: withVisible(function_list[[k]](value))
  11: function_list[[k]](value)
  12: dplyr::mutate_at(., .funs = as_radian, .vars = d_vars)
  13: mutate(.tbl, !!!funs)
  14: mutate.tbl_df(.tbl, !!!funs)
  15: mutate_impl(.data, dots, caller_env())
  16: (function (x, ...) 
     {
         UseMethod("as_radian")
     })(t5)
  
  ── 9. Error: SSM Table captions are correct (@test-ssm_visualization.R#61)  ────
  no applicable method for 'as_radian' applied to an object of class "c('double', 'numeric')"
  1: ssm_analyze(jz2017, PA:NO, octants()) at testthat/test-ssm_visualization.R:61
  2: ssm_analyze_means(.data, scales = !!scales_en, angles = angles, boots = boots, contrast = contrast, 
         interval = interval, listwise = listwise, call = call)
  3: ssm_bootstrap(bs_input = bs_input, bs_function = bs_function, angles = angles, boots = boots, 
         interval = interval, contrast = contrast, listwise = listwise, strata = bs_input$Group)
  4: bs_t %>% dplyr::mutate_at(.funs = as_radian, .vars = d_vars)
  5: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: `_fseq`(`_lhs`)
  9: freduce(value, `_function_list`)
  10: withVisible(function_list[[k]](value))
  11: function_list[[k]](value)
  12: dplyr::mutate_at(., .funs = as_radian, .vars = d_vars)
  13: mutate(.tbl, !!!funs)
  14: mutate.tbl_df(.tbl, !!!funs)
  15: mutate_impl(.data, dots, caller_env())
  16: (function (x, ...) 
     {
         UseMethod("as_radian")
     })(t5)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 112 SKIPPED: 6 WARNINGS: 0 FAILED: 9
  1. Error: Single-group mean-based SSM results are correct (@test-ssm_analysis.R#7) 
  2. Error: Scale magnitudes greater than 5 trigger message (@test-ssm_analysis.R#174) 
  3. Error: Single-group correlation-based SSM results are correct (@test-ssm_analysis.R#188) 
  4. Error: Single-group mean-based SSM plot is correct (@test-ssm_visualization.R#5) 
  5. Error: Single-group correlation-based SSM plot is correct (@test-ssm_visualization.R#17) 
  6. Error: Measure-contrast SSM plot is correct (@test-ssm_visualization.R#27) 
  7. Error: Group-contrast correlation-based SSM plot is correct (@test-ssm_visualization.R#40) 
  8. Error: Removing plots with low fit works as expected (@test-ssm_visualization.R#54) 
  9. Error: SSM Table captions are correct (@test-ssm_visualization.R#61) 
  
  Error: testthat unit tests failed
  Execution halted