Cov txheej txheem:

Koj yuav subset cov ntaub ntawv li cas?
Koj yuav subset cov ntaub ntawv li cas?

Video: Koj yuav subset cov ntaub ntawv li cas?

Video: Koj yuav subset cov ntaub ntawv li cas?
Video: Data Science with Python! Joining Tables Without a Common Column 2024, Hlis ntuj nqeg
Anonim

Yog li, txhawm rau rov hais dua, ntawm no yog 5 txoj hauv kev uas peb tuaj yeem teeb tsa cov ntaub ntawv hauv R:

  1. Subset siv brackets los ntawm rho tawm cov kab thiab kab peb xav tau.
  2. Subset siv cov brackets los ntawm kev tshem cov kab thiab kab peb tsis xav tau.
  3. Subset siv cov brackets ua ke nrog qhov twg () ua haujlwm thiab % hauv% tus neeg teb xov tooj.
  4. Subset siv cov subset () ua haujlwm.

Ntawm no, kuv yuav xaiv ib kem los ntawm Dataframe hauv R li cas?

Xaiv Cov Ntaub Ntawv Ncej kab hauv R

  1. rub(): Extract kem qhov tseem ceeb raws li vector.
  2. xaiv(): Extract ib lossis ntau kab ua ib lub rooj ntaub ntawv.
  3. select_if(): Xaiv kab raws li ib qho xwm txheej.
  4. Helper functions - starts_with(), ends_with(), contains(), matches(), one_of(): Xaiv cov kab/vaj huam sib luag raws li lawv lub npe.

Tsis tas li ntawd, Tibble yog dab tsi? A tib , los yog tbl_df, yog ib qho niaj hnub reimagining ntawm cov ntaub ntawv. Tibbles yog cov ntaub ntawv. thav duab uas tub nkeeg thiab tsis txaus ntseeg: lawv ua tsawg dua (piv txwv li lawv tsis hloov pauv lub npe lossis hom, thiab tsis txhob ua ib feem sib piv) thiab yws ntau dua (piv txwv li thaum tsis muaj qhov sib txawv).

Kuj paub, yog cov ntaub ntawv ncej hauv R?

Data frame yog ib ob seem cov ntaub ntawv qauv hauv R . Nws yog ib rooj plaub tshwj xeeb ntawm ib daim ntawv teev npe uas muaj txhua qhov sib npaug ntawm qhov ntev. Txhua feem tsim cov kab ke thiab cov ntsiab lus ntawm cov khoom sib xyaw ua cov kab.

Kuv yuav xaiv qee cov kab hauv Excel li cas?

Xaiv ib lossis ntau kab thiab kab

  1. Xaiv tsab ntawv nyob rau saum toj kom xaiv tag nrho kem. Los yog nyem rau ntawm ib qho ntawm tes hauv kab thiab tom qab ntawd nias Ctrl + Chaw.
  2. Xaiv tus naj npawb kab los xaiv tag nrho kab.
  3. Txhawm rau xaiv kab lossis kab uas nyob ib sab, tuav Ctrl thiab xaiv kab lossis kab zauv.

Pom zoo: