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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:22:26+00:00 2026-06-12T08:22:26+00:00

I have a Dataset_1 that only has some values some months, e.g. Day Month

  • 0

I have a Dataset_1 that only has some values some months, e.g.

Day Month   Year    Value
10  5   2003    12
17  5   2003    46
1   6   2003    23
16  6   2003    43
16  10  2003    23
26  10  2003    12

and Dataset_2 that has regular 1 hour values for the same time period e.g

Day Month   Year    Hour Value
10  5       2003    0:00 13
10  5       2003    1:00 12
(...)
26  10      2003    21:00 12
26  10      2003    22:00 12

Dataset_1 is used to evaluate Dataset_2. I would therefore like to plot the regular-interval-Dataset_2 against the not-so-regular-Dataset_1. Is there a way, probably using the date stamps that are in common, to plot all the timesteps of Dataset_2 but to get R to plot the points of Dataset_1 at the corresponding date of Dataset_2?

Thank you.

  • 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-12T08:22:27+00:00Added an answer on June 12, 2026 at 8:22 am

    The only thing you have to do is to declare your dates and time as indeed date and time objects:

    Dataset_1$timestamp <- strptime(paste(Dataset_1$Day, Dataset_1$Month, 
                                    Dataset_1$Year, sep="-"), format="%d-%m-%Y")
    Dataset_2$timestamp <- strptime(paste(Dataset_2$Hour, Dataset_2$Day, 
                                    Dataset_2$Month, Dataset_2$Year, sep="-"), 
                                    format="%H:%M-%d-%m-%Y")
    

    You can then plot your data normally without taking any specific precaution because plotwill recognize they are date and time objects.

    plot(Dataset_1$timestamp, Dataset_1$Value)
    lines(Dataset_2$timestamp, Dataset_2$Value)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with some binary data that I have stored in arbitrarily long arrays
I currently have a dataset which has two columns that I'd like to compare.
I have a dataset that has patient data according to the site they visited
I have a database that has four columns like this level_1, level_2, level_3, level_4
Have an application that has a Jtable with the data held in RAM, the
I have about 1 billion datasets that have a DatasetKey and each has between
I have a DataGridView that is bound to a DataSet. The DataSet has its
I have a java swing application which has a form that I populate by
I have a dataset of 1 minute data of 1000 stocks since 1998, that
I have ten values in the dataset, numbers 1 - 10 and corresponding values.

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.