Not exactly sure what has changed, however I am not receiving this error when my code has run in the past. I've installed older versions of Rtools and continue to get the same error. Below is the part of the code that is causing the error.
Error:
Error in describe[[column$name]][["counts"]][["unique"]] :
subscript out of bounds
In addition: Warning message:
In for (i in (1L:cols)[do]) { :
TraceBack:
11.
get_column_measures(result$column.names, date_CI, result$description) at summaries.R#19
10.
summaries(sales_item, unique_CI = NULL, date_CI = sales_item_columns$date$index) at checkSalesItem.R#19
9.
checkSalesItem(sales_items_file_params, file, sales_item_columns,
product) at run_profiling_si.R#79
8.
eval(ei, envir)
7.
eval(ei, envir)
6.
withVisible(eval(ei, envir))
5.
source(paste(profilingScriptLocation, "/run_profiling_si.R",
sep = "")) at profiling_sales_item.R#59
4.
eval(ei, envir)
3.
eval(ei, envir)
2.
withVisible(eval(ei, envir))
1.
source("C:/Users/*/Desktop//****Profiler v0.3/profiling_sales_item.R") ( is private info)
Script that is breaking:
function (column.names, CI, describe) {
column <- list(name=find_column_by_id(column.names, CI))
if (!is.null(column$name)) {
column$is.missing <- FALSE
column$count <- as.integer(describe[[column$name]][["counts"]][["n"]])
column$missing <- as.integer(describe[[column$name]][["counts"]][["missing"]])
column$unique <- as.integer(describe[[column$name]][["counts"]][["unique"]])
if (is.missing_column(describe, column$name))
column$is.missing <- TRUE
} else
column$is.missing <- TRUE
column
}