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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:59:32+00:00 2026-06-13T20:59:32+00:00

I have a current DataFrame that looks like this: DATETIME MEAS_AVG TARG_MIN TARG_AVG TARG_MAX

  • 0

I have a current DataFrame that looks like this:

      DATETIME MEAS_AVG TARG_MIN TARG_AVG TARG_MAX DESPORT_NOTE
1  2012/04/10 14:03:37   0.2888     0.22     0.25     0.27      GOOD_PT
2  2012/03/30 07:48:17   0.2544     0.22     0.25     0.27      GOOD_PT
3  2012/03/24 19:23:08   0.2333     0.22     0.25     0.27      GOOD_PT
4  2012/03/25 16:10:17   0.2111     0.22     0.25     0.27      GOOD_PT
5  2012/04/10 00:58:29   0.2222     0.22     0.25     0.27      GOOD_PT
6  2012/04/14 18:32:52   0.2888     0.22     0.25     0.27      GOOD_PT
7  2012/04/21 14:47:47   0.2777     0.22     0.25     0.27      GOOD_PT

The data frame is called df3 and the specific column I am looking to replace the dates for are df3$DATETIME.

I have this function in my code already in order to strip the datetime:

date <- strptime(df3$DATETIME, "%Y/%m/%d %H:%M:%S")

All I am looking to replace all the datetime information with simple month names. This is what it should look like after the replace function:

      DATETIME MEAS_AVG TARG_MIN TARG_AVG TARG_MAX DESPORT_NOTE
1  April   0.2888     0.22     0.25     0.27      GOOD_PT
2  March   0.2544     0.22     0.25     0.27      GOOD_PT
3  March   0.2333     0.22     0.25     0.27      GOOD_PT
4  March   0.2111     0.22     0.25     0.27      GOOD_PT
5  April   0.2222     0.22     0.25     0.27      GOOD_PT
6  April   0.2888     0.22     0.25     0.27      GOOD_PT
7  April   0.2777     0.22     0.25     0.27      GOOD_PT

I am been looking all over for a simple replace column function, but can’t seem to find it. I know that I can use the as.Date() function with the formated %B to return the unabreviated month. The only problem is I do not know how to use this to replace the column values already existing.

I can list the months using this function:

list(month=months(as.Date(df3$DATETIME)))
  • 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-13T20:59:34+00:00Added an answer on June 13, 2026 at 8:59 pm
    df3$DATETIME <- months(as.Date(df3$DATETIME))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two dataframes; one is 48 rows long and looks like this: name
We have this current database which we need to replace some tables by anther
I have the current bundle reference working locally: Bundles.Reference(/Content/global.css); On the development site, this
I have the current time format returned from the web service: 2012-06-25T23:45:52.664Z I want
I have three current thoughts on how to do this: re-implement AuthenticationService, which uses
I have a current Date object that needs to be incremented by one day
I have current date in javascript like below: self.currentDate = ko.observable(new Date()); I want
I'd like to show the names of columns in a large dataframe that contain
I have a DataFrame that represents stock returns. To split adjust the closing price,
I have current PHP codebase written in procedural (mainly) style that our client is

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.