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

  • Home
  • SEARCH
  • 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 9192111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:50:44+00:00 2026-06-17T20:50:44+00:00

I am using ggplot for ploting. I came up with a problem, the code

  • 0

I am using ggplot for ploting.
I came up with a problem, the code is:

require(ggplot2)
require(reshape2)

df <- data.frame(HMn25_30$avg,for30$cgsbi_1,dt_hmn$dt)
names(df)[1]='WSN 25'
names(df)[2]='MetoSwiss Forecast'
df.m <- melt(df, names(df)[3], names(df)[1:2])
df.m$dt_hmn.dt <- strptime(as.character(df.m$dt_hmn.dt), format = "%m/%d/%Y %H:%M:%S")
p <- ggplot(df.m, aes(x = dt_hmn.dt, y = value, group = variable, color = variable))
size=14),axis.text.y  = element_text(angle=00, vjust=0.5, size=30))
p

Data:

> head(df.m)
        dt_hmn.dt variable  value
1 9/29/2007 23:00   WSN 25  0.280
2  9/30/2007 0:00   WSN 25  0.208
3  9/30/2007 1:00   WSN 25 -0.264
4  9/30/2007 2:00   WSN 25 -0.480
5  9/30/2007 3:00   WSN 25 -0.708
6  9/30/2007 4:00   WSN 25 -0.714

 str(df.m)
'data.frame':   50 obs. of  3 variables:
 $ dt_hmn.dt: Factor w/ 25 levels "9/29/2007 23:00",..: 1 2 3 14 19 20 21 22 23 24 ...
 $ variable : Factor w/ 2 levels "WSN 25","MetoSwiss Forecast": 1 1 1 1 1 1 1 1 1 1 ...
 $ value    : num  0.28 0.208 -0.264 -0.48 -0.708 -0.714 -0.498 -0.216 0.126 0.574 ...

when I want to use strptime all the time_date column is changing to the “NA”.

Plz guide me in this matter.

  • 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-17T20:50:45+00:00Added an answer on June 17, 2026 at 8:50 pm

    You can not use :%S because you don’t have it in your data. Try this:

    strptime(dt$dt_hmn.dt, "%m/%d/%Y %H:%M")
    
    # [1] "2007-09-29 23:00:00" "2007-09-30 00:00:00" "2007-09-30 01:00:00" 
    #     "2007-09-30 02:00:00" "2007-09-30 03:00:00" "2007-09-30 04:00:00"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making a dotplot using ggplot with the code and data that is
I am plotting some data series along with regression lines using this code: ggplot(dt1.melt,
I'm using the tips data set in ggplot2 . If I do sp =
I am using ggplot to graph a number of data sets, however I would
I am using ggplot to plot some data. It works fine but I'd like
I wanted to plot time series data in R by using ggplot but I
I am using ggplot to chart some data and I noticed that legends text
I am using ggplot to plot time course data (fixation proportions over time to
I have generated the following plot using the R code that follows it: ggplot(lengths,
I am working on finishing up a graph generated using ggplot2 like so... ggplot(timeSeries,

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.