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

Rで家を光らせる / tokyor90_r2hue

Rで家を光らせる / tokyor90_r2hue

Tokyo.R#90 https://tokyor.connpass.com/event/204802/ での発表スライド
r2hueパッケージ https://github.com/uribo/r2hue 🌟

D12a80cab206033a820ccff8319f957b?s=128

Uryu Shinya

March 06, 2021
Tweet

Transcript

  1. ͰՈΛ 5PLZP3 Shinya Uryu @u_ribo uribo ޫΒͤΔ

  2. https://github.com/sponsors/uribo ఏڙ @yutannihilation @katsurakob @kanji14134 @siero5335 @niszet @ito4303 @ak9782427 👉

    (JU)VC4QPOTPST ͷօ͞· @teramonagi @takehikoihayashi @ytknzw
  3. )VF"1* IUUQTEFWFMPQFSTNFFUIVFDPN (&5 1045 165 %&-&5& ిٿΛ఺౮ ً౓͸ʜ )551ϦΫΤετΛհͯ͠ϒϦοδʹ઀ଓ͞Εͨর໌Λ੍ޚ

  4. ࢖͍উखʹෆຬ ΞϓϦέʔγϣϯ͕͋Δ͕ ΋ͬͱָΛ͍ͨ͠ ىಈ͢Δͷ͕໘౗

  5. Ͱ΍Ε͹ྑ͍ ͳ͍͠34UVEJP ؔ਺Ͱ੍ޚͰ͖Δ ݁Ռͷ֬ೝʹ΋࢖͑Δ جຊతʹىಈͬ͠ͺͳ͠

  6. ઌۦऀͨͪ GBTDJOBUJOHGJOHFST1IJMJQT)VF HJPDPNBJIVFDPOUSPMMFS 3ݴޠͳ͍ʂ Ͱ΋ԶԶ࣮૷ʹ͍ͨ͠ ͳͷͰ࡞ͬͨ VSJCPSIVF

  7. ंྠͷ࠶։ൃͱ͸ݴΘͤͳ͍ ॲཧ಺༰ʹԠ੍ͯ͡ޚ ৭ࢦఆͷ9:ઃఆΛָʹ ॲཧͷޙʹ఺౮

  8. δϣόϯχ͕Ұ൩Ͱ΍ͬͨ # র໌Λ఺౮ hue_lights_state(id = 1, on = TRUE, xy

    = c(0.144041, 0.187314)) # র໌Λফ౮ hue_lights_state(id = 1, on = FALSE) r2hue::hue_lights_state("uribo/r2hue") library(r2hue)
  9. δϣόϯχ͕Ұ൩Ͱ΍ͬͨ # ॲཧͷޙʹ఺౮ mean(c(2, 3, 4)) %>% light_switch(id = 4,

    on = TRUE) # ॲཧ಺༰ͷঢ়ଶग़ྗͱಉ࣌ʹ఺౮ flash(id = 2, type = "abort", message = "Τϥʔग़ྗͰ੺͘఺౮")
  10. ࣮૷ͷίπ VSJCPDPMPSJOGP MBUFS SMBOH STUVEJPBQJ xy = c(0.144041, 0.187314) xy

    = colorinfo::col2xy("#08A0FF")) flatten_dbl ( DMJ later::later( ~ hue_lights_state( id = id, on = on, ... ), delay = delay) IVFʹૹΔ৭ͷࢦఆ ॲཧ࣮ߦޙʹর໌ૢ࡞
  11. &OKPZ