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

The Archive Base Latest Questions

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

I am trying to do the comparison of my observed and modeled data sets

  • 0

I am trying to do the comparison of my observed and modeled data sets for two stations. One station is called station “red” and another is called “blue”. I was able to create the facets but when I tried to add two series in one facet, only one facet got updated while other didn’t.

This means for blue only one series is plotted and for red two series are plotted.

The code I used is as follows:

    # install.packages("RCurl", dependencies = TRUE)
require(RCurl)
out <- postForm("https://dl.dropbox.com/s/ainioj2nn47sis4/watersurf1.csv?dl=1", format="csv")
watersurf <-  read.csv(textConnection(out))
watersurf[1:100,]

watersurf$coupleid <- factor(rep(unlist(by(watersurf$id,watersurf$group1,
                                           function(x) {ave(as.numeric(unique(x)),FUN=seq_along)}
                                           )),each=6239))


p <- ggplot(data=watersurf,aes(x=time,y=data,group=id))+geom_line(aes(linetype=group1),size=1)+facet_wrap(~coupleid)
p

Is it also possible to add a third series in the graph but of unequal length (i.e not same interval)?

The output is enter image description here
I followed the example on this page to create the graphs.
http://www.ats.ucla.edu/stat/r/faq/growth.htm

  • 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-17T14:13:33+00:00Added an answer on June 17, 2026 at 2:13 pm

    Is this what you are looking for,

    ggplot(data = watersurf, aes( x = time, y = data))
           + geom_line(aes(linetype = group1, colour = group1), size = 0.2) 
           + facet_wrap(~ id)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a loop, I am trying to defer the comparison the two value()s of
I'm trying to find a good way to have version comparison between two files
I'm trying to do a '>' comparison between two relativedeltas: if(relativedelta(current_date, last_activity_date) > relativedelta(minutes=15)):
I'm trying to use the data comparison feature in visual studio 2010 to see
While trying to extract data from a view by joining it with two other
I am trying to run a comparison between the output of a command called
I'm trying to do a comparison between the data of a table of a
A current problem I am trying to solve is generating a comparison of two
I am trying to perform a fair comparison of XenServer vs ESX and one
I am trying to set a CssClass based on a the comparison of two

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.