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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:57:03+00:00 2026-06-04T10:57:03+00:00

I have many data frames which are the output of the same kind of

  • 0

I have many data frames which are the output of the same kind of analysis but with different parameters.
I’d like to plot the data frames with ggplot, changing the main title to specify the different parameters used.

I thought about putting the data frames into a list and using lapply. But I couldn’t figure out how to change the title accordingly in lapply.

  • 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-04T10:57:05+00:00Added an answer on June 4, 2026 at 10:57 am

    You could try something like this,

    parameters = data.frame(p1=letters[1:5], p2=round(rnorm(5),2))
    l = replicate(5, data.frame(x=1:10, y=rnorm(10)), simplify=FALSE)
    names(l) = do.call(paste, c(parameters, sep=","))
    
    plot_one = function(x)
      ggplot(data = l[[x]]) + geom_path(aes(x, y)) +
       opts(title = x)
    
    plots = lapply(names(l), plot_one)
    
    do.call(gridExtra::grid.arrange, plots)
    

    enter image description here

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

Sidebar

Related Questions

We have some data which represents many model runs under different scenarios. For a
I have many data.frames, for example: df1 = data.frame(names=c('a','b','c','c','d'),data1=c(1,2,3,4,5)) df2 = data.frame(names=c('a','e','e','c','c','d'),data2=c(1,2,3,4,5,6)) df3 =
I have many objects reference the same class of stored data. In previous programs,
I have a to-many relationship in my data model, and I'd like to get
I have a data frame with an id column and some (potentially many) columns
I have many tens of thousands of rows of data that need to be
I have many forms that use AJAX (w/ jQuery) for validation and data submission.
I have a star schema type data base, with fact tables that have many
I have a silly question here. I define a class with many data members,
Many applications have grids that display data from a database table one page at

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.