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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:33:04+00:00 2026-05-28T07:33:04+00:00

I have a data.frame with the following characteristics: +—————————————–+ | earning budget ts total

  • 0

I have a data.frame with the following characteristics:

+-----------------------------------------+
|         earning   budget    ts    total |
+-----------------------------------------+
| 1            14      3 2012-01-18    11 |
| 2            15      3 2012-01-19    23 |
| 3            22      4 2012-01-20    42 |
| 4            43      4 2012-01-21    82 |
| 5            19      5 2012-01-22    98 |
| 6            24      5 2012-01-23   119 |
+-----------------------------------------+

And I am using the following code to get a ggplot

qplot(ts, total, data=res, geom="histogram")

But when I run the following code I get a graph without line?

qplot(ts, total, data=res, geom="line")

I tried

plot(res)

and that works fine.

Any idea why the “line” graph is not understanding my plot?

  • 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-28T07:33:05+00:00Added an answer on May 28, 2026 at 7:33 am

    What data type is ts? (What does str(YourDataFame$ts) give?) If it is character or factor, then you need to add a group=1 to the aes() when you make a line since otherwise it only draws lines per group, and each character/factor defines a different group (and thus each x value is a separate group).

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

Sidebar

Related Questions

I have the following dummy code: dt<-data.frame(country=letters[1:20],val=rnorm(20),siz=rnorm(20)) qplot(x=country,y=val,data=dt,geom=point,size=siz) Now I want to increase the
Suppose I have the following data frame: Data1 X1 X2 1 15 1 2
I'm struggling with the following. If have a (big) data frame with the following:
I have the following data test<-data.frame(group=1:10, var.a=rnorm(n=10,mean=500,sd=20), var.b=runif(10)) I would like a barplot with
I have the following data.frames: a <- data.frame(id = 1:3, v1 = c('a', NA,
I have the following data: a=c(1:10) b=c(16:25) c=c(24:33) wa=c(3,7,3,3,3,3,3,3,3,1) wb=c(3,2,3,3,3,3,3,3,3,8) wc=c(4,1,4,4,4,4,4,4,4,1) z=data.frame(a,b,c,wa,wb,wc) I want
I have a data frame containing the following fields: a, b, c. a and
I have a large data frame with the following fields (example data). #dput(data) gives...
I have a data frame with a series of times in the following format:
I have the following data frame z x y 1 1 a 2 2

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.