Upgrade to Pro — share decks privately, control downloads, hide ads and more …

RBC202003_Day1_Period2

sakaue
March 19, 2020

 RBC202003_Day1_Period2

sakaue

March 19, 2020
Tweet

More Decks by sakaue

Other Decks in Education

Transcript

  1. Agenda 1. Package ͱ͸Կ͔ (5) 2. Package ͷೖΕํ: ੜ R

    ฤ (10) 3. Package ͷ؅ཧ౳: ੜ R ฤ (10) 4. Package ͷೖΕํ: RStudio ฤ (10) 5. Package ͷ؅ཧ౳: RStudio ฤ (10) 6. RStudio Server ΁ͷϩάΠϯ (10) 7. ԋशʹ͙࣍ԋश (30)
  2. Agenda 1. Package ͱ͸Կ͔ (5) 2. Package ͷೖΕํ: ੜ R

    ฤ (10) 3. Package ͷ؅ཧ౳: ੜ R ฤ (10) 4. Package ͷೖΕํ: RStudio ฤ (10) 5. Package ͷ؅ཧ౳: RStudio ฤ (10) 6. RStudio Server ΁ͷϩάΠϯ (10) 7. ԋशʹ͙࣍ԋश (30)
  3. 1. Packageͱ͸Կ͔ • ͋ΔॲཧɾػೳʹಛԽͨ͠ϓϩάϥϜ • ๭ Excel Ͱ͍͏ͱ͜ΖͷΞυΠϯతͳ΋ͷ • cf.ʮ෼ੳπʔϧʯʹΑΔ౷ܭղੳػೳ௥Ճ

    • baseʢجຊύοέʔδʣ͚ͩͰ΋ 1,000 Ҏ্ • ಛघͳॲཧΛߦ͏ࡍ͸ɼผͷ package Λ௥Ճ • ݴޠॲཧʹಛԽͨ͠΋ͷ΋͋Δʢex. RMeCabʣ • ೚͖ͤͬΓʹͳΓ΍͍͢ͷͰա౓ͳґଘʹ༻৺
  4. 1. Packageͱ͸Կ͔ • ඞཁͳύοέʔδΛͲ͏୳͔͢ • CRAN ʹΞΫηε • https://cran.r-project.org/web/packages/available_packages_by_name.html •

    Google ݕࡧʢݕࡧྗΛ஁͑Α͏ʣ • ʮ΍Γ͍ͨॲཧɹRɹύοέʔδʯͳͲ • ӳޠͰݕࡧ͢Δͱɼͳ͓ݟ͚ͭ΍͘͢ͳΔ
  5. Agenda 1. Package ͱ͸Կ͔ (5) 2. Package ͷೖΕํ: ੜ R

    ฤ (10) 3. Package ͷ؅ཧ౳: ੜ R ฤ (10) 4. Package ͷೖΕํ: RStudio ฤ (10) 5. Package ͷ؅ཧ౳: RStudio ฤ (10) 6. RStudio Server ΁ͷϩάΠϯ (10) 7. ԋशʹ͙࣍ԋश (30)
  6. Agenda 1. Package ͱ͸Կ͔ (5) 2. Package ͷೖΕํ: ੜ R

    ฤ (10) 3. Package ͷ؅ཧ౳: ੜ R ฤ (10) 4. Package ͷೖΕํ: RStudio ฤ (10) 5. Package ͷ؅ཧ౳: RStudio ฤ (10) 6. RStudio Server ΁ͷϩάΠϯ (10) 7. ԋशʹ͙࣍ԋश (30)
  7. 2. Package ͷೖΕํ: ੜ R ฤ • install.packages() ؔ਺Λ࢖͏ •

    install.packages("ೖΕ͍ͨύοέʔδ໊") • ೋॏҾ༻ූͰғ͏ͷΛ͓๨Εͳ͘ • ґଘؔ܎ʹ͋Δύοέʔδ΋ೖΕΔ৔߹͸ɼ Ҿ਺ dependencies Λ TRUE ʹ͓ͯ͘͠
  8. 2. Package ͷೖΕํ: ੜ R ฤ • corpora ύοέʔδΛೖΕͯΈΔ (p.

    83) • install.packages("corpora", dependencies = TRUE) • ೋॏҾ༻ූͰғ͏ͷΛ͓๨Εͳ͘ • dependencies લͷΧϯϚ๨Εʹ༻৺ • dependencies ͷೖྗʹ༻৺ʢิ׬Λ࢖͏ʣ https://cran.r-project.org/package=corpora
  9. 2. Package ͷೖΕํ: ੜ R ฤ • c() ؔ਺Λ࢖͍ෳ਺ͷύοέʔδΛೖΕΔ •

    install.packages(c("ca", "car"), dependencies = TRUE) • ೋॏҾ༻ූͰғ͏ͷΛ͓๨Εͳ͘ • ۠੾ΓͷΧϯϚ๨ΕɾΧοίͷ਺ʹ༻৺ • ҰؾʹೖΕΔͱϑϦʔζͷՄೳੑ͋Γ https://cran.r-project.org/web/packages/ca/index.html https://cran.r-project.org/web/packages/car/index.html
  10. Agenda 1. Package ͱ͸Կ͔ (5) 2. Package ͷೖΕํ: ੜ R

    ฤ (10) 3. Package ͷ؅ཧ౳: ੜ R ฤ (10) 4. Package ͷೖΕํ: RStudio ฤ (10) 5. Package ͷ؅ཧ౳: RStudio ฤ (10) 6. RStudio Server ΁ͷϩάΠϯ (10) 7. ԋशʹ͙࣍ԋश (30)
  11. Agenda 1. Package ͱ͸Կ͔ (5) 2. Package ͷೖΕํ: ੜ R

    ฤ (10) 3. Package ͷ؅ཧ౳: ੜ R ฤ (10) 4. Package ͷೖΕํ: RStudio ฤ (10) 5. Package ͷ؅ཧ౳: RStudio ฤ (10) 6. RStudio Server ΁ͷϩάΠϯ (10) 7. ԋशʹ͙࣍ԋश (30)
  12. 3. Package ͷ؅ཧ౳: ੜ R ฤ • library() ؔ਺Ͱ༗ޮԽ •

    library(corpora) Ͱར༻Մೳʹ • install.packages ͱҧ͍ɼೋॏҾ༻ූ͸ෆཁ • ೖΕ͚ͨͩͰ͸࢖͑ͳ͍ͷ͕΍΍໘౗ • ͕ͩɼҰൠͷΞϓϦ΋ىಈ͕ඞཁͳͷͱಉ͡ • R/RStudio ىಈ࣌ʹͦͷ౎౓༗ޮԽ • ϝϞϦෛՙɾಈ࡞஗ԆճආͷͨΊ • library() ͱ࣮ߦ͢Δͱɼ࢖͑ΔύοέʔδҰཡΛදࣔ
  13. 3. Package ͷ؅ཧ౳: ੜ R ฤ • packageVersion() ؔ਺ͰόʔδϣϯνΣοΫ •

    packageVersion("νΣοΫ͍ͨ͠ύοέʔδ") • όά౳͕͋Γߋ৽͢΂͖͔Ͳ͏͔Λ൑அ͢Δ • packageVersion("corpora") Ͱ݁ՌΛνΣοΫ
  14. 3. Package ͷ؅ཧ౳: ੜ R ฤ • update.packages() ؔ਺Ͱ࠷৽൛ʹߋ৽ •

    update.packages() ͷΈͰߋ৽ΛνΣοΫ • ࠷ॳʹαʔόΛฉ͔ΕΔͷͰɼJapan ͔ΒબͿ • Update? (Yes/no/cancel) ͱฉ͔ΕΔͷͰɼͻͱͭͣͭબͿ • ࣄલʹ Release note ͳͲΛνΣοΫ͔ͯ͠Βߋ৽͢Δ
  15. 3. Package ͷ؅ཧ౳: ੜ R ฤ • remove.packages() ؔ਺ͰύοέʔδΛ࡟আ •

    remove.packages(“࡟আ͍ͨ͠ύοέʔδ") • ύοέʔδ໊͸ɼೋॏҾ༻ූͰғ͏ඞཁ͋Γ
  16. Agenda 1. Package ͱ͸Կ͔ (5) 2. Package ͷೖΕํ: ੜ R

    ฤ (10) 3. Package ͷ؅ཧ౳: ੜ R ฤ (10) 4. Package ͷೖΕํ: RStudio ฤ (10) 5. Package ͷ؅ཧ౳: RStudio ฤ (10) 6. RStudio Server ΁ͷϩάΠϯ (10) 7. ԋशʹ͙࣍ԋश (30)
  17. Agenda 1. Package ͱ͸Կ͔ (5) 2. Package ͷೖΕํ: ੜ R

    ฤ (10) 3. Package ͷ؅ཧ౳: ੜ R ฤ (10) 4. Package ͷೖΕํ: RStudio ฤ (10) 5. Package ͷ؅ཧ౳: RStudio ฤ (10) 6. RStudio Server ΁ͷϩάΠϯ (10) 7. ԋशʹ͙࣍ԋश (30)
  18. 4. Package ͷೖΕํ: RStudio ฤ 1. Package λϒ͔Β Install ϘλϯΛԡ͢

    2. ೖΕ͍ͨύοέʔδ໊Λೖྗ͠ Install ϘλϯΛԡ͢ ↑ೖΕ͍ͨύοέʔδ໊Λೖྗ
  19. Agenda 1. Package ͱ͸Կ͔ (5) 2. Package ͷೖΕํ: ੜ R

    ฤ (10) 3. Package ͷ؅ཧ౳: ੜ R ฤ (10) 4. Package ͷೖΕํ: RStudio ฤ (10) 5. Package ͷ؅ཧ౳: RStudio ฤ (10) 6. RStudio Server ΁ͷϩάΠϯ (10) 7. ԋशʹ͙࣍ԋश (30)
  20. Agenda 1. Package ͱ͸Կ͔ (5) 2. Package ͷೖΕํ: ੜ R

    ฤ (10) 3. Package ͷ؅ཧ౳: ੜ R ฤ (10) 4. Package ͷೖΕํ: RStudio ฤ (10) 5. Package ͷ؅ཧ౳: RStudio ฤ (10) 6. RStudio Server ΁ͷϩάΠϯ (10) 7. ԋशʹ͙࣍ԋश (30)
  21. Agenda 1. Package ͱ͸Կ͔ (5) 2. Package ͷೖΕํ: ੜ R

    ฤ (10) 3. Package ͷ؅ཧ౳: ੜ R ฤ (10) 4. Package ͷೖΕํ: RStudio ฤ (10) 5. Package ͷ؅ཧ౳: RStudio ฤ (10) 6. RStudio Server ΁ͷϩάΠϯ (10) 7. ԋशʹ͙࣍ԋश (30)
  22. Agenda 1. Package ͱ͸Կ͔ (5) 2. Package ͷೖΕํ: ੜ R

    ฤ (10) 3. Package ͷ؅ཧ౳: ੜ R ฤ (10) 4. Package ͷೖΕํ: RStudio ฤ (10) 5. Package ͷ؅ཧ౳: RStudio ฤ (10) 6. RStudio Server ΁ͷϩάΠϯ (10) 7. ԋशʹ͙࣍ԋश (30)
  23. 6. RStudio Server ΁ͷϩάΠϯ • جຊతͳ࢖͍ํ͸ RStudio Desktop ͱಉ͡ •

    ࢖༻ޙͷ Sign outʢը໘ӈ্ʣΛ͓๨Εͳ͘ • 3ݶҎ߱͸ɼݪଇɼRStudio Server Λ࢖͍·͢
  24. Agenda 1. Package ͱ͸Կ͔ (5) 2. Package ͷೖΕํ: ੜ R

    ฤ (10) 3. Package ͷ؅ཧ౳: ੜ R ฤ (10) 4. Package ͷೖΕํ: RStudio ฤ (10) 5. Package ͷ؅ཧ౳: RStudio ฤ (10) 6. RStudio Server ΁ͷϩάΠϯ (10) 7. ԋशʹ͙࣍ԋश (30)
  25. Agenda 1. Package ͱ͸Կ͔ (5) 2. Package ͷೖΕํ: ੜ R

    ฤ (10) 3. Package ͷ؅ཧ౳: ੜ R ฤ (10) 4. Package ͷೖΕํ: RStudio ฤ (10) 5. Package ͷ؅ཧ౳: RStudio ฤ (10) 6. RStudio Server ΁ͷϩάΠϯ (10) 7. ԋशʹ͙࣍ԋश (30)
  26. 7. ԋशʹ͙࣍ԋश 1. खݩ PC ͔Β corpora ύοέʔδΛ࡟আ 2. खݩ

    PC ͷύοέʔδҰཡΛදࣔɼΞοϓσʔτ֬ೝ 3. खݩ PC ʹ tidyverse ύοέʔδΛΠϯετʔϧ 4. Ի੠෼ੳ༻ͷύοέʔδΛ୳ͯ͠खݩ PC ʹΠϯετʔϧ • CRAN ʹ͋Δ΋ͷʹݶఆʢ໺ྑύοέʔδʹ஫ҙʣ 5. ࠓ·ͰͷԋशΛ RStudio Server ্Ͱ͢΂ͯ࠶౓࣮ߦ • खݩ PC Ͱ࣮ߦͨ͜͠ͱ͕͢΂ͯ࠶ݱͰ͖Δ͔Λ֬ೝ
  27. 7. ԋशʹ͙࣍ԋशʢώϯτʣ 1. ʮR ύοέʔδ ࡟আʯ౳Ͱ Web ݕࡧ 2. ʮR

    ύοέʔδ Ұཡʯ౳Ͱ Web ݕࡧ 3. ʮtidyverse ύοέʔδ ΠϯετʔϧʯͰݕࡧ 4. ʮsound analysis R package CRANʯ౳Ͱݕࡧ 5. جຊతʹɼίʔυΛίϐϖ͢ΔͷΈͰ͢