Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

performTemporalCharacterization fails with error in window.default(x, ...) : 'start' cannot be after 'end' #734

Open
xitology opened this issue Aug 15, 2023 · 0 comments

Comments

@xitology
Copy link

On our OMOP dataset, Achilles::performTemporalCharacterization() fails with the output:

Error in window.default(x, ...) : 'start' cannot be after 'end'
Calls: <Anonymous> ... <Anonymous> -> window -> window.ts -> as.ts -> window.default
Execution halted

This error could be traced to an invocation of Achilles::tsCompleteYears(). This function is called on a time series to exclude partial years from the beginning and the end of the series. However, Achilles::tsCompleteYears() fails when the time series does not contain a full year interval. The problem could be easily reproduced with:

$ Rscript -e 'Achilles::tsCompleteYears(ts(1:20, frequency = 12, start = c(2022, 02)))'
Error in window.default(x, ...) : 'start' cannot be after 'end'
Calls: <Anonymous> -> window -> window.ts -> as.ts -> window.default
Execution halted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant