Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9282313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T18:20:36+00:00 2026-06-18T18:20:36+00:00

If I run this simple code: my_xts <- .xts(1:10*1,1:10) rollapply(my_xts, list(seq(-2, 0)), sum, partial

  • 0

If I run this simple code:

my_xts <- .xts(1:10*1,1:10)
rollapply(my_xts, list(seq(-2, 0)), sum, partial = 1)

In the new version of xts (0.9-3), I get:

Error in rollapply.xts(my_xts, list(seq(-2, 0)), sum, partial = 1) : 
(list) object cannot be coerced to type 'integer'
In addition: Warning message:
In rollapply.xts(my_xts, list(seq(-2, 0)), sum, partial = 1) :
partial argument is not currently supported

While in the old xts (0.8-6) runs smoothly.

Seems it is related with the option width. As in the vignette of rollapply, “width can be a list regarded as offsets compared to the current time”. In the new version this cannot be possible.

Any workaround? Is there a possibility to call rollapply in a different way, in order to achieve the old behaviour?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T18:20:38+00:00Added an answer on June 18, 2026 at 6:20 pm

    rollapply.xts wasn’t registered as an S3 method until version 0.8-9. That’s why this worked for you previously. Since there wasn’t an xts S3 method, rollapply.zoo would have been dispatched, which would have returned a zoo object (not an xts object).

    rollapply.xts currently does not support width=list(...), but you can get the same results you did previously by converting your xts object to a zoo object before calling rollapply.

    rollapply(as.zoo(my_xts), list(seq(-2, 0)), sum, partial = 1)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I run this simple code: from pylab import * import numpy as np
I am trying to run this seemingly simple piece of code which is repeated
When I run this code, it shows error. Please, help me out. I'm trying
I've written this simple connection in my code: OracleConnection con = new OracleConnection(Data Source=ORCL;User
I'm running this simple code: import threading, time class reqthread(threading.Thread): def run(self): for i
I have a very strange issue with PHP. I run this very simple code:
Thanks in advance. This is my sample code. Whenever i try to run it
What's the fastest way using either DOS scripting or PowerShell to run this simple
I'm going to run this really simple cod that will be compiled in visual
I am trying to run this dreadfully simple command in Bash java -cp nasa-top-secret.jar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.