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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:28:44+00:00 2026-05-31T03:28:44+00:00

I have a big csv file where the first column is the day of

  • 0

I have a big csv file where the first column is the day of the year and the second column is the time in minutes (ie. 00:00): year of measurement=2010

1,0,2.701,104.3,5.02,2.985,13.71,645.97,1018.9,6.249,4.166,.501 
1,1,2.701,104.3,5.02,2.985,13.71,645.97,1018.9,6.249,4.166,.501 
1,2,2.737,104.3,5.228,3.006,13.71,645.97,1018.9,6.249,4.166,.518
1,3,2.805,104.3,4.958,3.027,13.71,645.97,1018.8,7.08,3.749,.767
1,4,2.821,104.3,4.999,3.006,13.71,645.97,1018.9,7.08,4.166,.79
1,5,2.847,104.2,5.208,3.048,13.72,645.97,1018.9,6.249,4.166,.567
1,6,2.881,104.2,4.853,3.027,13.71,645.97,1018.7,6.666,4.166,.688

I want to merge column 1 and 2 using datetime classes in R such that I get one single column starting with 2010-01-01 00:00:00

Cheers,
Navin

  • 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-31T03:28:45+00:00Added an answer on May 31, 2026 at 3:28 am

    From the example data you’ve supplied, the general format of your second column is not obvious. In particular, how are times that do not fall in the first hour of the day (e.g. 1:01 AM) represented?

    Depending on that second column’s format, you should be able to cobble together something like the following:

    d <- data.frame(day=1, minute=1:10)
    
    s <- paste(2010, d$day, d$minute, sep="-")
    strptime(s, format="%Y-%j-%M")
    #  [1] "2010-01-01 00:01:00" "2010-01-01 00:02:00" "2010-01-01 00:03:00"
    #  [4] "2010-01-01 00:04:00" "2010-01-01 00:05:00" "2010-01-01 00:06:00"
    #  [7] "2010-01-01 00:07:00" "2010-01-01 00:08:00" "2010-01-01 00:09:00"
    # [10] "2010-01-01 00:10:00"
    

    Here, %j represents “day of year as decimal number (001-366)”, as documented in ?strptime. (See that same help file for descriptions of the many other time formats that support conversion to and from R’s POSIXt date-time classes).

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

Sidebar

Related Questions

I have many (near 100) big csv files with sellID in first column. I
I have a big string (let's call it a CSV file, though it isn't
I have a big csv file which lists connections between nodes in a graph.
I have a big csv file with datetime and value recorded every 10 seconds.
I have quite a big network in a CSV file. It containt 450k nodes
http://img32.imageshack.us/img32/6649/workspace1001.png big version I have this product data in a csv file, but some
I have a CSV file which is about 1GB big and contains about 50million
I have 2 big CSV file with millions of rows. Because those 2 CSVs
I have a big csv files with the following format: CSV FILE 1 id,
I have an quite big CSv File I want to have in Google Maps

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.