Error in RSS.table[as.character(opt[1]), i] : subscript out of bounds when using C++

Open
#13 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp, r
Domain
data

Research direction

Create a minimal time-series example that exercises the C++ path, then trace breakpoints() into extract.breaks() and compare RSS.table dimensions with the R path. Inspect the indexing at RSS.table[as.character(opt[1]), i]; done means the C++ path completes without the subscript error and produces consistently sized RSS.table data.

Written by the indexing model from the issue text.

Description

bug

I noticed a difference when running the R code and the C++ code path: in the latter, I sometimes get the error:

Error in RSS.table[as.character(opt[1]), i] : subscript out of bounds

This comes from breakpoints(), extract.breaks(), which implies that the RSS.table is not the same size as it would be in the R implementation (as I have never run into that problem in the R code path). I'll try and get an example time series for that.

Dominant language
R
Stars
6
Forks
5
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bfast2/strucchangeRcpp

All issues in bfast2/strucchangeRcpp

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.