Closed iqbaljamal closed 2 years ago
It is difficult to troubleshoot the exact cause with the error message. I need a reproduction to figure out the cause of this problem. Please share the data, or if you can't, let us know that the result of the following command is:
dlookr::describe(data_for_QA)
Thanks. Here are the results:
dlookr::describe(data_for_QA) A tibble: 6 x 26 described_variables n na mean sd se_mean IQR skewness kurtosis p00 p01 p05 p10 p20 p25 p30 p40 p50 p60 p70 p75 p80 p90 p95 p99 p100
@iqbaljamal,
An error occurred because variable V2 is a constant with all values equal to 2. Binning constant values in data analysis is unnecessary. Try doing it after removing the V2 variable.
I'll put logic to handle exceptions in the case of a data set that contains constants like this.
@iqbaljamal,
A version that fixes this problem has been uploaded to github. CRAN is not reflected in a short period of time. To use the function now, install the modified version as follows and use it.:
devtools::install_github("choonghyunryu/dlookr")
Thank you so much for this fix!
dlookr (0.6.0.9000)
When running transformation_web_report. eda_web_report and diagnose_web_report ran fine. Here's the traceback:
Error in plot.window(...) : need finite 'xlim' values 40. stop(e) 39. value[3L] 38. tryCatchOne(expr, names, parentenv, handlers[[1L]]) 37. tryCatchList(expr, classes, parentenv, handlers) 36. tryCatch({ result <- withVisible(rlang::eval_tidy(expr)) if (result$visible) { capture.output(print(result$value)) ... 35. capturePlot(~{ plot(bins[[index]], base_family = base_family) }, device = device, width = width pixelratio, height = height pixelratio, res = 72 * pixelratio) 34. rlang::eval_tidy(rlang::expr(capturePlot({ { expr } ... 33. htmltools::plotTag({ plot(bins[[index]], base_family = base_family) }, sprintf("A plot of bins"), width = 600, height = 400, device = grDevices::png) 32. (function (index) { p_hist <- htmltools::plotTag({ plot(bins[[index]], base_family = base_family) ... 31. do.call(func, args[seq_len(numArgs)]) 30. callFunc(details, index) 29. FUN(X[[i]], ...) 28. lapply(seq_len(nrow(data)), function(index) { callFunc(details, index) }) 27. FUN(X[[i]], ...) 26. lapply(columnKeys, function(key) { column <- list(accessor = key, name = key, type = colType(data[[key]])) if (!is.null(columns[[key]])) { column <- mergeLists(column, columns[[key]]) ... 25. reactable(., defaultColDef = colDef(style = "font-size: 14px;color: hsl(0, 0%, 40%);"), columns = list(variables = colDef(name = "Variables", minWidth = 100, maxWidth = 150), types = colDef(name = "Data Types", minWidth = 80, maxWidth = 100), unique_count = colDef(name = "Unique", ... 24. tab_numerical %>% reactable(defaultColDef = colDef(style = "font-size: 14px;color: hsl(0, 0%, 40%);"), columns = list(variables = colDef(name = "Variables", minWidth = 100, maxWidth = 150), types = colDef(name = "Data Types", minWidth = 80, maxWidth = 100), unique_count = colDef(name = "Unique", ... 23. html_binning(reportData, base_family = base_family) 22. eval(expr, envir, enclos) 21. eval(expr, envir, enclos) 20. eval_with_user_handlers(expr, envir, enclos, user_handlers) 19. withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)) 18. withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler) 17. handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler)) 16. timing_fn(handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers)), warning = wHandler, error = eHandler, message = mHandler))) 15. evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, debug = debug, last = i == length(out), use_try = stop_on_error != 2L, keep_warning = keep_warning, keep_message = keep_message, output_handler = output_handler, include_timing = include_timing) 14. evaluate::evaluate(...) 13. evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message), stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L ... 12. in_dir(input_dir(), expr) 11. in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message), stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) ... 10. eng_r(options) 9. block_exec(params) 8. call_block(x) 7. process_group.block(group) 6. process_group(group) 5. withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { setwd(wd) cat(res, sep = "\n", file = output %n% "") ... 4. process_file(text, output) 3. knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) 2. rmarkdown::render(paste(path, rmd, sep = "/"), output_file = output_file) 1. transformation_web_report(data_for_QA, output_dir = QA_dir, author = "HS HSM Team", title = paste0("transformation", percent_sample, "%"), outputfile = paste0("transform", dbo_table_name, " ", percent_sample, ".html"), theme = "blue", browse = TRUE, sample_percent = percent_sample)