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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:40:39+00:00 2026-05-15T22:40:39+00:00

I have data at a number of days since an event. This data is

  • 0

I have data at a number of days since an event. This data is sampled irregularly – my time points are like 0, 5, 6, 10, 104 days. I don’t have specific date-time information – i.e. I have no idea when in real life the event I’m studying occurred.

I’d like to plot, using ggplot, my time series. I can use, say

p <- ggplot(data,aes(x=time,y=expression))
p <- p + geom_point()

but of course my x-axis variables are plotted next to each other, so that the distance between t=10 and t=104 is the same as t=5 and t=6. So I can make something up like

start <- ISOdate(2001, 1, 1, tz = "")
data$time <- start + data$time*60*60*12

which almost works, but now the ticks on my x-axis are horribly inaccurate date times. I could re-format them maybe? But can’t see anyway to make the format “days from start”. And by now I’ve been googling around for quite a while, with the nagging feeling that I’m missing something seriously obvious. Am I?

  • 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-15T22:40:40+00:00Added an answer on May 15, 2026 at 10:40 pm

    Sounds like your time variable is a factor or maybe a character vector, not a numeric value! If you do data$time <- as.numeric(data$time) it may well solve your problem.

    ggplot is pretty good at using the right sort of scale for the right sort of data. (Sadly, data import routines in R generally are less smart…)

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

Sidebar

Related Questions

I have MYSQL data like this id | number 1 | 3 4 |
I have a table with data exactly like this: ID Heading Description Time Location
I have been struggling with getting this to work for a number of days
I have this data.frame : df <- read.table(text= section to from time a 1
I have data stored in three columns of Excel Column A: Serial Number Column
I have data about colors. Some of those colors consist of a number of
I have some data, let's say the number of sells of the month. I
I have a data.frame called series_to_plot.df which I created by combining a number of
In Oracle, I have a table with a column of data type NUMBER. I
We have a number of data objects that realize INotifyPropertyChanged to allow for WPF

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.