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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:49:30+00:00 2026-05-25T09:49:30+00:00

I have a large list with 2000 component dataframes. The following is just an

  • 0

I have a large list with 2000 component dataframes. The following is just an example:

set.seed(1234)
mydf1 <- data.frame(v = c(1:5), x = rnorm(5, 0.06, 0.01))
mydf2 <- data.frame(v = c(1:5), x = rnorm(5, 0.06, 0.01))
mydf3 <- data.frame(v = c(1:5), x = rnorm(5, 0.06, 0.01))
mylist <- list(mydf1, mydf2, mydf3)

mylist

 [[1]]
  v          x
1 1 0.03792934
2 2 0.05277429
3 3 0.06084441
4 4 0.02654302
5 5 0.05429125

[[2]]
  v          x
1 1 0.05506056
2 2 0.04425260
3 3 0.04453368
4 4 0.04435548
5 5 0.04109962

[[3]]
  v          x
1 1 0.04522807
2 2 0.04001614
3 3 0.04223746
4 4 0.05064459
5 5 0.05959494

I want to subset this whole list by value of x which is less than < 0.05 (within each list components) and creat a new list.

mylist1 <- mylist[ which ( x < 0.05),] 

Does not work….please help. Thanks…

  • 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-25T09:49:31+00:00Added an answer on May 25, 2026 at 9:49 am

    One way of doing this is to use lapply with your subset code as the function.

    Since mydf1[mydf1$x<0.05, ] will return the subset that you are interested in, the code becomes:

    lapply(mylist, function(x)x[x$x<0.05, ])
    
    [[1]]
      v          x
    1 1 0.04792934
    4 4 0.03654302
    
    [[2]]
    [1] v x
    <0 rows> (or 0-length row.names)
    
    [[3]]
    [1] v x
    <0 rows> (or 0-length row.names)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a large list of static data from a server that i load
I have a rather large list of data that contains 5 properties per element.
I have a webpage that displays a very large list of data. Since this
Hi I have a large list of data: http://paste-it.net/public/y17027d/ It is 67859 rows by
I need some help to store some data efficiently. I have a large list
I have a large data frame that Im working with, the first few lines
I have a large list of objects inside JSON like this: var data =
Basically, I have a reasonably large list (a year's worth of data) of times
I have a large list of email addresses, and I need to determine which
Okay, basically, I have a large list of phone numbers in a text file

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.