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 8643137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:57:31+00:00 2026-06-12T11:57:31+00:00

I am currently using split.xts in the form of split(xts.obj,’days’) to create lists of

  • 0

I am currently using split.xts in the form of split(xts.obj,'days') to create lists of intra-day data, so that each element of the list represents one day. This breaks up a day from midnight to (just before) midnight the next day is there a way to split up the data into the lists at an arbitrary time, e.g. say 9am till 08:59.59.999am the next day?

It’s a reasonably generic question but if you want sample data…here it is…The below should illustrate my point about the split occurring at midnight.

require(xts)
x <- xts(rnorm(1000000),Sys.time()-1000000:1)
x1 <- split(x,'days')
head(x1[[2]])

EDIT:

The solution is very similar to one produced as the answer to this question… How do I extract / subset day+0 to day+1 index times from minutely data via xts in R?, but if there is a more direct way of doing it that would be appreciated…

  • 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-12T11:57:32+00:00Added an answer on June 12, 2026 at 11:57 am

    This creates a vector of times (for GMT 9AM):

    as.POSIXct(as.Date( seq(range(index(x))[1], range(index(x))[2], by="days") )) + 60*60*9
    cts <- .Last.value
    xp9 <- split(x, cut(index(x), cts) )
    str(xp9)
    #List of 11
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently using the following to split a file into words - Is there
I'm currently using the split command to split a large file into many 50MB
I'm currently using this to obtain latency: def time_deltas(infile): entries = (line.split() for line
currently I am using String.split() like so: String[] tmp = props.get(i).getFullName().split(\\.); String name =
I'm currently using Aspose PDF Kit to split a 'master PDF' up into individual
i am currently using the following mapping to map a split entity and is
I am currently using TortoiseSVN to manage a couple of the projects that I
I am currently using pg_dump piped to gzip piped to split . But the
I am currently using JQuery Ajax to retrieve and display some data as follows.
Currently using the HTTPServletRequest class and specifically the .getQueryString method to retrieve an inputted

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.