Cov txheej txheem:

Kuv yuav khaws cov ntaub ntawv R hauv R li cas?
Kuv yuav khaws cov ntaub ntawv R hauv R li cas?

Video: Kuv yuav khaws cov ntaub ntawv R hauv R li cas?

Video: Kuv yuav khaws cov ntaub ntawv R hauv R li cas?
Video: Tsis Siab Los Hlub Tiag - SODA Poj Laib Khej Me (Cover) 2024, Hlis ntuj nqeg
Anonim

Rau khaws cov ntaub ntawv as ib RData khoom, siv lub cawm muaj nuj nqi. Rau khaws cov ntaub ntawv ua ib yam khoom RDS, siv saveRDS muaj nuj nqi. Nyob rau hauv txhua rooj plaub, thawj qhov kev sib cav yuav tsum yog lub npe ntawm tus R khoom koj xav tau cawm . Tom qab ntawd koj yuav tsum suav nrog cov ntaub ntawv sib cav uas muaj cov ntaub ntawv npe lossis kab ntawv koj xav tau cawm tus cov ntaub ntawv teem rau.

Kuj tseem paub yog, koj yuav txuag chaw ua haujlwm hauv R li cas?

Teb: Yog! Koj tuaj yeem ua tau txuag chaw ua haujlwm siv cov ntawv qhia zaub mov. Rau qhov no, nyem rau ntawm cov ntawv qhia zaub mov thiab tom qab ntawd nyem txuag chaw ua haujlwm . Koj yuav pom lub dialog box, xauj mus rau lub nplaub tshev uas koj xav mus cawm cov ntaub ntawv thiab muab cov ntaub ntawv npe ntawm koj tus kheej xaiv.

Tom qab ntawd, lo lus nug yog, ua li cas koj txuag lub luag haujlwm hauv R? Txhawm rau muab cov txheej txheem ua haujlwm hauv R:

  1. Tsim ib daim ntawv tshiab R Script (. R cov ntaub ntawv) hauv tib daim ntawv teev npe ua haujlwm raws li koj qhov. Rmd cov ntaub ntawv lossis R tsab ntawv. Muab cov ntaub ntawv piav qhia lub npe uas ntes cov hom haujlwm hauv cov ntaub ntawv.
  2. Qhib cov ntaub ntawv R Script thiab ntxiv ib lossis ntau lub zog rau cov ntaub ntawv.
  3. Txuag koj cov ntaub ntawv.

Ib yam li ntawd, tib neeg nug, Kuv yuav thauj cov ntaub ntawv R rau hauv R li cas?

YaRrr! Pirate's Guide to R

  1. 1 save() Txhawm rau txuag cov khoom xaiv rau hauv ib qho. RData cov ntaub ntawv, siv lub save() muaj nuj nqi.
  2. 2 cawm. duab()
  3. 3 load() Txhawm rau thauj cov ntaub ntawv. RData, uas yog, txhawm rau nqa tag nrho cov khoom muaj nyob hauv. RData cov ntaub ntawv rau hauv koj qhov chaw ua haujlwm tam sim no, siv lub load() ua haujlwm.
  4. 4 rm() Txhawm rau tshem tawm cov khoom ntawm koj qhov chaw ua haujlwm, siv rm() ua haujlwm.

Kuv yuav nrhiav tau kuv qhov chaw ua haujlwm hauv R li cas?

R Rau Dummies Ib qho zoo heev ntawm RStudio cia koj tshuaj xyuas cov ntsiab lus ntawm cov chaw ua haujlwm thaum twg los tau yam tsis muaj ntaus ntawv R lus txib. Los ntawm lub neej ntawd, lub qhov rais sab saum toj sab xis hauv RStudio muaj ob lub tabs: Chaw ua haujlwm thiab keeb kwm. Nyem qhov Chaw ua haujlwm tab to saib cov variables hauv koj chaw ua haujlwm , nrog rau lawv cov nqi.

Pom zoo: