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

Rにおけるバージョン管理とプロジェクト運用 / rstudio-for-team

Uryu Shinya
April 13, 2019

Rにおけるバージョン管理とプロジェクト運用 / rstudio-for-team

Uryu Shinya

April 13, 2019
Tweet

More Decks by Uryu Shinya

Other Decks in Research

Transcript

  1. Uryu Shinya @u_ribo
    5PLZP3
    ʹ͓͚Δόʔδϣϯ؅ཧͱ
    ϓϩδΣΫτӡ༻

    View Slide

  2. ʂઈࢍൃചதʂ
    ػցֶशͷͨΊͷಛ௃ྔΤϯδχΞϦϯά
    ͦͷݪཧͱ1ZUIPOʹΑΔ࣮ફ
    ຊ೔ɺ
    ݙຊ͋Γ·͢
    https://twitter.com/smly/status/1098419169521917952
    https://note.mu/kilometer/n/n16ed99686cd9

    View Slide

  3. ػցֶशͱσʔλ෼ੳΛ࢖ͬͯɺ
    ΈΜͳ͕সͬͯ฻ΒͤΔࣾձΛ࡞Δ
    ͜ͱΛ໨తͱͯ͠Ϧϒʔτͨ͠
    ෼ࢄܕਓ޻஌ೳϦʔσΟϯά
    ΠϊϕʔγϣϯΧϯύχʔɻ
    ϗΫιΤϜʁ

    View Slide

  4. ओ୊
    ʢݸਓ΍ʣ෼ੳνʔϜͰͷ3 34UVEJPΛ࢖ͬͨ
    lඪ४తzͳϓϩδΣΫτͷӡ༻ํ๏Λ঺հ
    (JUʹΑΔσʔλɺϑΝΠϧͷόʔδϣϯ؅ཧ
    %PDLFSΛ࢖ͬͨνʔϜϝϯόʔؒͷ؀ڥ౷Ұ
    ͍
    Ζ
    ͸
    νʔϜͷͨΊͷ34UVEJP׆༻ज़

    View Slide

  5. 4PSSZ
    ͝ΊΜͳ
    3 34UVEJP͕ϝΠϯ͡Όͳ͍
    3ʹݶΒͣɺ
    1ZUIPO΍+VMJBͰ΋ݴ͑ΔΑ͏ͳ࿩
    σʔλαΠΤϯςΟετɺػցֶशΤϯδχΞ
    ޲͚ͱ͍͏ΑΓɺٕज़دΓͳ࿩୊ɻ
    ʮڞ௨஌ࣝʯͱͯ͠਎ʹ͚ͭͯ΄͍͠ɻ

    View Slide

  6. νʔϜͷͨΊͷ34UVEJP׆༻ज़
    ͍

    View Slide

  7. Կ͸ͱ΋͋Ε3QSPKΛ༻ҙ͠Α͏
    [email protected]

    34UVEJPͷϝχϡʔ͔Β
    'JMFŠ/FX1SPKFDU

    ΋͘͠͸

    View Slide

  8. 3QSPKͷઃఆ
    l/P /P :FTzͰ͍֮͑ͯͩ͘͞
    5PPMTŠ1SPKFDU0QUJPOT
    34UVEJPͷ্ཱ͕ͪΓ͕
    ஗͍Μ͚ͩͲʜ
    ͜Ε͕໰୊ͩͬͨΓ͢Δ

    View Slide

  9. ͏ͪͰ͸34UVEJP͸
    ࢖͍ͬͯͳ͍ΜͰ͢ɻ
    ͢·Μͳɻ
    IFSFύοέʔδͰ
    ੋඇʂʂ
    hereύοέʔδͷಋೖͰϑΝΠϧࢀরͷύε໰୊ͷ೰ΈΛղফ - cucumber flesh
    https://uribo.hatenablog.com/entry/2018/01/25/082000

    View Slide

  10. ϓϩδΣΫτΛอक͢Δύοέʔδ
    ϧʔϧΛઃ͚Δ͜ͱͰ҆શΛอোʢ׬ᘳͰ͸ͳ͍ʣ
    IFSF
    MJOUS TUZMFS
    BTTFSUS FOTVSFS
    DPOqJDUFE
    ໊લۭؒͷিಥΛconflictedύοέʔδͰ๷͙ - cucumber flesh
    https://uribo.hatenablog.com/entry/2018/09/29/103632
    ΞαʔτΛ࢖ͬͯݎ࿚ͳσʔλઃܭΛ͠Α͏DVDVNCFSqFTI
    IUUQTVSJCPIBUFOBCMPHDPNFOUSZ
    IFSFύοέʔδͷಋೖͰϑΝΠϧࢀরͷύε໰୊ͷ೰ΈΛղফDVDVNCFSqFTI
    IUUQTVSJCPIBUFOBCMPHDPNFOUSZ
    υϒωζϛΈ͍ͨʹඒ͘͠ͳ\MJOUS^͍2JJUB
    IUUQTRJJUBDPNXBLVUFLBJUFNTCCFFFBBD

    View Slide

  11. ໋໊نଇɺίʔσΟϯάελΠϧ
    σϑΝΫτελϯμʔυʹै͏ͷ͕ϕλʔ
    ˠબ୒ͷػձΛݮΒ͢
    ϑΝΠϧ໊
    ΦϒδΣΫτ໊
    ؔ਺໊
    εωʔΫέʔε
    The tidyverse style guide
    https://style.tidyverse.org/
    ߟ͑Δ͜ͱ͸ଟ͍ʜ
    ύΠϓԋࢉࢠ

    View Slide

  12. σΟϨΫτϦߏ੒ͷنଇ
    ਖ਼ղ͸ͳ͍͕νʔϜͰ߹ҙͰ͖ΔنଇΛ࡞Ζ͏
    Wilson et al. (2017). Good enough practices in scientific computing. PLOS
    http://doi.org/10.1371/journal.pcbi.1005510
    ϑΝΠϧ໊Λ
    ૢ࡞ର৅ʹ͢Δ͜ͱ΋ߟྀɻ
    ฒͼସ͑
    ύλʔϯϚον

    View Slide

  13. (JUʹΑΔσʔλɺϑΝΠϧͷόʔδϣϯ؅ཧ
    Ζ

    View Slide

  14. ྛ໺ி৿ྛࢿݯݱگथछผྸڃผ໘ੵσʔλ
    [email protected] lCJUMZUPLZPSVSJCPz

    [email protected]
    [email protected]
    [email protected]
    ର৅ͷ΢Σϒϖʔδ͔ΒYMTϑΝΠϧΛμ΢ϯϩʔυ
    YMTϑΝΠϧΛಡΈࠐΈɺUJEZʹ੔ܗ
    ͷ࡞ۀΛϫʔΫϑϩʔʹ૊ΈࠐΉ



    View Slide

  15. 34UVEJPͷ(JU࿈ܞػೳ͕༏ल
    HJUίϚϯυ͸ඞཁʹԠ֮ͯ͑͡Α͏
    34UVEJPͰ͸͡ΊΔ(JUʹΑΔόʔδϣϯ؅ཧ2JJUB
    IUUQTRJJUBDPNVSJJUFNTCGFEFE
    (JUύωϧͷΞΠίϯ
    ʁ
    .
    %
    "
    $ 3
    HJUͷ؅ཧର৅֎
    มߋ఺͕͋Δ
    ࡟আ͞Εͨ
    ؅ཧର৅ʹՃΘͬͨ
    ͜ͷଞʹ

    View Slide

  16. ϑΝΠϧͷࠩ෼Λ֬ೝ
    HJUίϚϯυ͸ඞཁʹԠ֮ͯ͑͡Α͏
    ࡟আɺ্ॻ͖͞Εͨ಺༰
    मਖ਼͞Εͨ಺༰

    View Slide

  17. ؅ཧର৅͸HJUJHOPSFͰ؅ཧ
    3ϑΝΠϧ
    ϚʔΫμ΢ϯϑΝΠϧ
    ςΩετܗࣜͷσʔλ
    όΠφϦܗࣜͷσʔλ
    ͋·Γྑ͘ͳ͍
    ྑ͍
    ϑΝΠϧαΠζʹ஫ҙʂ
    .#Ҏ্

    ΫϨσϯγϟϧͳ৘ใ
    ྑ͘ͳ͍
    ΢Σϒ"1*ͷͨΊͷ3ύοέʔδ࡞੒ͷצॴ4QFBLFS%FDL
    IUUQTTQFBLFSEFDLDPNZVUBOOJIJMBUJPOVFCVBQJGBMTFUBNFGBMTFSQBUVLF[J[VPDIFOHGBMTFLBOTVP TMJEF
    ࣮ࡍΘ͔Γ΍͍͢ˣ

    View Slide

  18. ࡞ۀϫʔΫϑϩʔ
    ࠩ෼Λ֬ೝ



    ίϛοτ
    ϓογϡ
    มߋ಺༰Λ
    ϦϞʔτϦϙδτϦʹ൓ө
    εςʔδϯά

    View Slide

  19. (JU)VCJTTVF׆༻
    ͳΜͰ΋ه࿥ɾڞ༗͍ͨ͠
    Կ͕໰୊ͩͬͨͷ͔
    ͲͷΑ͏ʹղܾͨ͠ͷ͔
    ࢼߦࡨޡͷϓϩηεΛؚΊͯ
    ಄ͷ֎ʹग़͢
    https://github.com/uribo/maff_forest_stats/issues/3
    ࣭໰͓଴͓ͪͯ͠Γ·͢ʂͰ͖Ε͹SFQSFY࢖ͬͯͶ!DVDVNCFSqFTI
    IUUQTVSJCPIBUFOBCMPHDPNFOUSZ

    View Slide

  20. %PDLFSΛ࢖ͬͨνʔϜϝϯόʔؒͷ؀ڥ౷Ұ
    ͸

    View Slide

  21. %PDLFS
    STUVEJPTFSWFSϕʔε
    SPDLFSϓϩδΣΫτͷΠϝʔδΛ࢖͏ͷ͕٢
    IUUQTIVCEPDLFSDPNVSPDLFS
    JOTUBMMSίϚϯυ
    JOTUBMM(JUIVCSίϚϯυ
    .3"/ͷTOBQTIPUΛར༻
    ஍ཧۭؒղੳͷͨΊͷύοέʔδΛؚΜͩίϯςφ
    $3"/ొ࿥ࡁΈͷύοέʔδΛ௥Ճ
    (JU)VC্ͷύοέʔδΛ௥Ճ



    View Slide

  22. EPDLFSDPNQPTF
    EPDLFSDPNQPTFVQ
    VQ
    EPXO
    CVJME
    IUUQTVSJCPIBUFOBCMPHDPNFOUSZ
    IUUQTVSJCPIBUFOBCMPHDPNFOUSZ

    View Slide

  23. ࡞ۀϫʔΫϑϩʔ
    EPDLFSΠϝʔδΛ
    Ϗϧυ



    %PDLFSpMFΛฤू 3ϑΝΠϧͱ
    Ұॹʹίϛοτ
    มߋ಺༰Λ
    ϦϞʔτϦϙδτϦʹ൓ө
    ύοέʔδΛ
    ௥Ճ

    View Slide

  24. &OKPZ
    ࠓ೔͔Β܅΋ϗΫιΤϜʂ

    View Slide