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

  • Home
  • SEARCH
  • 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 8881915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:26:49+00:00 2026-06-14T20:26:49+00:00

Possible Duplicate: How to delete a row in R I can’t figure out how

  • 0

Possible Duplicate:
How to delete a row in R

I can’t figure out how to simply remove row (n) from a dataframe in R.
R’s documentation and intro manual are so horribly written, they are virtually zero help on this very simple problem.
Also, every explanation i’ve found here/ on google is for removing rows that contain strings, or duplicates, etc, which have been excessively advanced for my problem and lead me to introduce more bugs and get nowhere. I just want to remove a row.

Thanks in advance for your help.

fyi the list is in the variable eld, which has 5 columns and 33 rows. I would like to remove row 14. I initialized eld with the following command

eld <- read.table("election2012.txt")

so my desired result is

eldNew <- eld(minus row 14)
  • 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-14T20:26:50+00:00Added an answer on June 14, 2026 at 8:26 pm
    eldNew <- eld[-14,]
    

    See ?"[" for a start …

    For ‘[’-indexing only: ‘i’, ‘j’, ‘…’ can be logical
    vectors, indicating elements/slices to select. Such vectors
    are recycled if necessary to match the corresponding extent.
    ‘i’, ‘j’, ‘…’ can also be negative integers, indicating
    elements/slices to leave out of the selection
    .

    (emphasis added)

    edit: looking around I notice
    How to delete the first row of a dataframe in R? , which has the answer … seems like the title should have popped to your attention if you were looking for answers on SO?

    edit 2: I also found How do I delete rows in a data frame? , searching SO for delete row data frame …

    Also http://rwiki.sciviews.org/doku.php?id=tips:data-frames:remove_rows_data_frame

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

Sidebar

Related Questions

Possible Duplicate: how to delete row from datagridview with a delete button? I have
Possible Duplicate: MySQL delete row from multiple tables I have 5 tables: members member_videos
Possible Duplicate: SQL Delete: can't specify target table for update in FROM clause I
Possible Duplicate: SQL Delete: can't specify target table for update in FROM clause I'm
Possible Duplicate: C++ delete - It deletes my objects but I can still access
Possible Duplicate: MySQL Duplicate rows how to delete duplicate rows from a table in
Possible Duplicate: How to delete an element from an array in php? For instance,
Possible Duplicate: What's the best way to delete all data from a table? Clear
Possible Duplicate: Remove Duplicate Rows Leaving Oldest Row Only? I have a posts_table in
Possible Duplicate: select multiple rows from uitableview and delete I am developing an application

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.