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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:19:40+00:00 2026-05-27T16:19:40+00:00

I have a question about the extraction of multiple values from a data.frame in

  • 0

I have a question about the extraction of multiple values from a data.frame in R.

I have a data.frame that looks like this:

              language ID                  value
1             Dutch   A1                  6
2             Dutch   A2                  6
3             Dutch   A3                  6
4             Dutch   A4                  6
5             Dutch   A5                  6
6        Portuguese   A1                  6
7        Portuguese   A2                  1
8        Portuguese   A3                  6
9        Portuguese   A4                 10
10       Portuguese   A5                  6
11            Irish   A4                  6
12            Irish   A1                  1
13            Irish   A2                  6
14            Irish   A3                  6 
15            Irish   A5                  6

I want to be able to select any set of columns which have a certain ID. For instance, I want to be able to select the columns which have ‘Dutch’ as their language, and ‘A1’, ‘A2’, and ‘A3’ and place them in a new data.frame. How can I do that?

Many 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-27T16:19:41+00:00Added an answer on May 27, 2026 at 4:19 pm

    Use subset to subset your data:

    subset(dfr, language=="Dutch" & ID %in% c("A1","A2","A3"))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have question about finding maximum x or y-value in text file. This is
I have a question about using streams in .NET to load files from disk.
I have a question about locking. This doesn't have to be only about record
I have a question about using new[] . Imagine this: Object.SomeProperty = new[] {string1,
I have a question about this question . I posted a reply there but
I have question about database optimizing, indexing. I have table that called projects and
I have a need to iterate through an amortization formula, which looks like this:
I have question about python and sqlite3. I want to drop a table from
I have question about removing element from QList. myclass.h: class node2D : public QObject
Today I have question about Eclipse . I use this IDE very long and

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.