How to Remove a Row From a Data Frame in R

Поделиться
HTML-код
  • Опубликовано: 21 авг 2024

Комментарии • 11

  • @alexmarvin3093
    @alexmarvin3093 Год назад

    i wish that every lesson was as easy as this tutorial

  • @collinmeredith7723
    @collinmeredith7723 2 года назад +7

    Does not work, only returns an error message

  • @heartheart5543
    @heartheart5543 3 года назад +5

    i cannot delete it, the result: Error in df[-c(12, 13), ] : object of type 'closure' is not subsettable

  • @jerneyalvarado2066
    @jerneyalvarado2066 2 года назад

    thanks, you help me a lot

  • @mshahriarsonet6926
    @mshahriarsonet6926 Год назад

    On the last method: We removed rows with 6 cyl, what if I want to keep rows with 6 cyl? What function should I write?

  • @tayyabhasan
    @tayyabhasan 3 года назад +2

    This doesn't remove a row from the data frame itself. It creates only a view.

    • @DataDaft
      @DataDaft  3 года назад +1

      I suppose that is technically true; if you wanted to do that, overwrite original df:
      df

    • @alexmarvin3093
      @alexmarvin3093 Год назад +1

      well.. the this operation can be used in the re-creation of a dataset- effectively removing what you don't want
      dataset

    • @alexmarvin3093
      @alexmarvin3093 Год назад

      the re-creation comes with assigning the same dataset as the new dataset with the {dataset

  • @user-js5dn2xg6z
    @user-js5dn2xg6z Год назад

    Pls delete