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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:15:47+00:00 2026-05-28T08:15:47+00:00

I have a dataset like this: Year MM DD HH 158 2010 7 1

  • 0

I have a dataset like this:

    Year MM DD HH
158 2010  7  1  5
159 2010  7  1  5
160 2010  7  1  6
161 2010  7  1  6

structure(list(Year = c(2010L, 2010L, 2010L, 2010L), MM = c(7L, 
7L, 7L, 7L), DD = c(1L, 1L, 1L, 1L), HH = c(5L, 5L, 6L, 6L)), .Names = c("Year", 
"MM", "DD", "HH"), row.names = 158:161, class = "data.frame")

How can I create a one datetime object from this data set (new column for this data)?

  • 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-05-28T08:15:48+00:00Added an answer on May 28, 2026 at 8:15 am

    There are a few options, here’s one (where x is your data.frame):

    x$datetime <- ISOdatetime(x$Year, x$MM, x$DD, x$HH, 0, 0)
    

    You can pass in the correct time zone if need be, see ?ISOdatetime.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a dataset like this in R: SchoolName Year Grade Other_cols_not_of_interest School1 1998
I have a dataset that looks like this year month age 2007 1 17
I have the dataset (pts) like this: x <- seq(-124.25,length=115,by=0.5) y <- seq(26.25,length=46,by=0.5) z
i have a dataset that looks like this: Bin Frequency 6.0 0 5.9 0
I have a dataset whose columns look like this: Consumer ID | Product ID
In report design, I have 2 tables (Current and Proposed) the structure like this:
I have a dataset like this: x A B 1 x 2 2 y
Disclaimer: this is homework. I have a SAS dataset of: ID VAL YEAR I
I have a dataset like this Obs MinNo EurNo MinLav EurLav 1 103 15.9
I'm writing a program in R. I have a dataset like this: category x-value

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.