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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:16:10+00:00 2026-06-13T02:16:10+00:00

I am attempting to perform a study on the clustering of high/low points based

  • 0

I am attempting to perform a study on the clustering of high/low points based on time. I managed to achieve the above by using to.daily on intraday data and merging the two using:

intraday.merge <- merge(intraday,daily)
intraday.merge <- na.locf(intraday.merge)
intraday.merge <- intraday.merge["T08:30:00/T16:30:00"] # remove record at 00:00:00

Next, I tried to obtain the records where the high == daily.high/low == daily.low using:

intradayhi <- test[test$High == test$Daily.High]
intradaylo <- test[test$Low == test$Daily.Low]

Resulting data resembles the following:

                     Open  High   Low Close Volume Daily.Open Daily.High Daily.Low Daily.Close Daily.Volume
2012-06-19 08:45:00 258.9 259.1 258.5 258.7   1424      258.9      259.1     257.7       258.7        31523
2012-06-20 13:30:00 260.8 260.9 260.6 260.6   1616      260.4      260.9     259.2       260.8        35358
2012-06-21 08:40:00 260.7 260.8 260.4 260.5    493      260.7      260.8     257.4       258.3        31360
2012-06-22 12:10:00 255.9 256.2 255.9 256.1    626      254.5      256.2     253.9       255.3        50515
2012-06-22 12:15:00 256.1 256.2 255.9 255.9    779      254.5      256.2     253.9       255.3        50515
2012-06-25 11:55:00 254.5 254.7 254.4 254.6   1589      253.8      254.7     251.5       253.9        65621
2012-06-26 08:45:00 253.4 254.2 253.2 253.7   5849      253.8      254.2     252.4       253.1        70635
2012-06-27 11:25:00 255.6 256.0 255.5 255.9    973      251.8      256.0     251.8       255.2        53335
2012-06-28 09:00:00 257.0 257.3 256.9 257.1    601      255.3      257.3     255.0       255.1        23978
2012-06-29 13:45:00 253.0 253.4 253.0 253.4    451      247.3      253.4     246.9       253.4        52539

There are duplicated results using the subset, how do I achieve only the first record of the day? I would then be able to plot the count of records for periods in the day.

Also, are there alternate methods to get the results I want? Thanks in advance.

Edit:

Sample output should look like this, count could either be 1st result for day or aggregated (more than 1 occurrence in that day):

Time        Count
08:40:00    60
08:45:00    54
08:50:00    60
...
14:00:00    20
14:05:00    12
14:10:00    30
  • 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-13T02:16:12+00:00Added an answer on June 13, 2026 at 2:16 am

    You can get the first observation of each day via:

    y <- apply.daily(x, first)
    

    Then you can simply aggregate the count based on hours and minutes:

    z <- aggregate(1:NROW(y), by=list(Time=format(index(y),"%H:%M")), sum)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to perform a synchronous write/read in a demux-based client application with MINA
I'm attempting to perform a link of previously generated .obj files (using the latest
I'm attempting to perform a duplicate clean-up query in MySQL, using a contacts table,
I am using mongoid on rails3. I am attempting to perform a very simple
I'm attempting to time code using RDTSC (no other profiling software I've tried is
Using Ravendb (build 960) I am attempting to perform a bulk update on a
Using an update panel I am attempting to perform an Async postback with a
I'm attempting to perform the most basic navigation with JQuery and I'm failing miserably.
I'm attempting to perform a DML operation against an Entity Framework model, specifically, an
I am attempting to perform a Storyboard segue from a UIbutton that is a

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.