debugging - R: Error in fBody[[i]] while running debugSource -


I have an R script with approximately 1400 lines. I have recently started receiving the following error message. I am able to run the script using highlighting and ctrl-R, but I can not run the script in debug mode. Any suggestions on how to detect error?

& gt; DebugSource ('~ / work / R / h60_ maintenance / do_mega_analysis.R') error in fBody [[i]]: Out of bounds of CSTSTS & gt; Option (error = recovery) & gt; Error in fBody ([~ / working / R / h60_maintenance / do_mega_analysis.R ')) [[]]: Enter the subscript one frame number out of range, or to exit 1, 0: debugSource ("~ / work / En / h / 60 / maintenance / (fun) "": 2: (function (filename, encoding, breakline) {env & lt; - new.env (parent = empty ()) $ env $ fun & lt; - 3: SuppressWarnings (.rs.setfunctionBreakpoints ("funny", env, lapply (step, function) {phase $ at} 4: calling handlers (express, warning = task (w) invokeRestart ("thank you") 5: .rs .setFunctionBreakpoints ("fun", env, lapply (step, work) {Step $ at}) 6: Press message (trace (what = function name, where = envoyer, = lapply (strsplit (as.character (Step 7: Calling handlers (Expr, Message = function (c) InvokeRestart ("muffleMessage")) 8: trace (what = functionName, where = envir, at = lapply (strsplit (as.character (steps), ","), as.Numer 9: eval.parent (call) 10: Eval (expr, p) 11 : Eval (expr, envir, enclos) 12: methods :: TraceWithMethods (what = FunctionName, where = & lt; Environment & gt ;, at = lapply (strsplit (as.cha 13: new (traceClass, def = ifEdit) def parent origin, tracer = tracer, exit = exit, at = at, print 14: initialize (value,. ..) 15: Start (value, ...) 16: .intitressable (. Object, ...) 17: .motorcred function (DIF, tracer, exit, print, edit)

The error may be related to the following lines, because these lines are associated with Option 10: eval (expr, p).

  imds_rollup <- imds_detail_dt [, {## If there is only one line in the ID group, then do not return anything (count_every_fault = .N, max_ci_value = part Katma (ci.value), max_root_tarn_time_year_sec = max (rotor.time.time..in.re..s), max_rotor_turn_time_ground_sec = max (rotor time time ... on.gound S.s.)), Setkeyv (imds_rollup, c ("buno", "fileEventIndex")) imds_rollup $ max_ci_value & lt; - NULL # max_ci_value has all NA  

This is an R-studio mess, your code does not have a bug, I close it to my R Studio project (Project workspace Without saving it) and then resolved it open again.


Comments