Cov txheej txheem:

Setwd yog dab tsi?
Setwd yog dab tsi?

Video: Setwd yog dab tsi?

Video: Setwd yog dab tsi?
Video: What Is AI? | Artificial Intelligence | What is Artificial Intelligence? | AI In 5 Mins |Simplilearn 2024, Hlis ntuj nqeg
Anonim

getwd rov qab ua tiav filepath sawv cev rau cov npe ua haujlwm tam sim no ntawm tus txheej txheem R; setwd (dir) yog siv los teeb tsa cov npe ua haujlwm rau dir.

Raws li, Setwd R yog dab tsi?

setwd / getwd – Teem Lub Chaw Ua Haujlwm Hauv R . Zoo li ntau daim ntawv thov desktop, koj R ib puag ncig yog ib txwm taw tes rau ntawm cov npe tshwj xeeb ntawm koj lub computer. Daim ntawv teev npe no feem ntau hu ua daim ntawv teev npe ua haujlwm.

Tsis tas li ntawd, kuv yuav mus rau C tsav li cas hauv kev hais kom ua? Nkag mus rau lwm qhov tsav , type cov tsav tsab ntawv, ua raws li ":". Piv txwv li, yog tias koj xav tau hloov tus tsav los ntawm " C :" rau "D:", koj yuav tsum ntaus "d:" thiab nias Nkag mus ntawm koj cov keyboard. Rau hloov tus tsav thiab daim ntawv teev npe tib lub sijhawm, siv cd lus txib , ua raws li "/d" hloov.

Raws li txoj cai, kuv yuav nrhiav tau kuv daim ntawv teev npe ua haujlwm hauv R li cas?

R ib txwm taw tes ntawm a phau ntawv ntawm koj lub computer. Koj ua tau nrhiav pom uas phau ntawv los ntawm runthe getwd (get ua hauj lwm directory ) muaj nuj nqi; qhov haujlwm no tsis muaj kev sib cav. Rau hloov koj ua hauj lwm directory , siv setwd thiab qhia txoj hauv kev mus rau qhov xav tau nplaub tshev.

Kuv yuav hloov cov npe ua haujlwm hauv R studio li cas?

Muaj ntau ntau txoj hauv kev los hloov cov chaw ua haujlwm tam sim no:

  1. Siv lub setwd R function.
  2. Siv cov cuab yeej | Hloov Ua Haujlwm Dir ntawv qhia zaub mov (Session | Teem WorkingDirectory ntawm mac). Qhov no tseem yuav hloov qhov chaw nyob ntawm Files pane.
  3. Los ntawm nyob rau hauv cov ntaub ntawv pane, siv qhov Ntau | Teem raws li WorkingDirectory zaub mov.

Pom zoo: