본문 바로가기
아두이노

R Studio로 아두이노 굴리기①

by 할10000 2022. 4. 3.

글쓴이가 자주갖고 노는 아두이노(Arduino). 그런데 요즘 R언어를 배우다보니 이런 생각이 들더란 말이다. 

R언어로 아두이노를 만지작거릴 수 있지 않을까? 검색을 했더니 역시나 가능했다. 

그 방법을 여기에 적는다. [여기]를 참고했다. 

 

먼저 R Studio를 열고 다음과 같이 친다. " "안에 들어간 것들은 패키지의 이름인데, Serial을 제외한 나머지는 당최 무엇을 위해 필요한 건지 감이 잡히지 않는다. 설명을 읽어보자. 

Tidyverse는 데이터 시각화 및 핸들과 같은 데이터 과학 작업을 위해 설계된 R 패키지 모음이다. 직렬 통신은 RS232 / RS422 / RS485 또는 컴퓨터의 다른 가상 직렬 인터페이스에서 이진수 및 ASCII 데이터를 읽고 쓸 수 있다. Plotly를 사용하면 "ggplot2" 그래픽 에서 대화형 웹 그래픽(단체 채팅방 같은 거)을 만들 수 있다 . 

다 읽었으면 어서 깔아보자.

install.packages(c("tidyverse", "serial", "plotly", "magrittr"))

실행을 시키면 처음엔 파일이 없어 뭘 할 수 없네 어쩌네하는 메시지 창이 순간 뜨는데, 이때 놀라면 안된다.

곧바로 겁날 정도로 뭔가 엄청난 양의 파일들이 깔리기 때문이다. 실행창에 뜬 메시지는 다음과 같다. 

 install.packages(c("tidyverse", "serial", "plotly", "magrittr"))
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
‘C:/Users/user/Documents/R/win-library/4.1’의 위치에 패키지(들)을 설치합니다.
(왜냐하면 ‘lib’가 지정되지 않았기 때문입니다)
‘sys’, ‘bit’, ‘ps’, ‘sass’, ‘rappdirs’, ‘rematch’, ‘askpass’, ‘bit64’, ‘prettyunits’, ‘processx’, ‘evaluate’, ‘highr’, ‘xfun’, ‘bslib’, ‘jquerylib’, ‘tinytex’, ‘colorspace’, ‘backports’, ‘ellipsis’, ‘generics’, ‘glue’, ‘assertthat’, ‘blob’, ‘DBI’, ‘lifecycle’, ‘R6’, ‘tidyselect’, ‘withr’, ‘gargle’, ‘uuid’, ‘cellranger’, ‘curl’, ‘ids’, ‘rematch2’, ‘gtable’, ‘isoband’, ‘cpp11’, ‘pkgconfig’, ‘mime’, ‘openssl’, ‘fansi’, ‘utf8’, ‘clipr’, ‘vroom’, ‘tzdb’, ‘progress’, ‘callr’, ‘fs’, ‘knitr’, ‘rmarkdown’, ‘selectr’, ‘stringi’, ‘farver’, ‘labeling’, ‘munsell’, ‘fastmap’, ‘yaml’, ‘Rcpp’, ‘later’, ‘broom’, ‘cli’, ‘crayon’, ‘dbplyr’, ‘dplyr’, ‘dtplyr’, ‘forcats’, ‘googledrive’, ‘googlesheets4’, ‘ggplot2’, ‘haven’, ‘hms’, ‘httr’, ‘jsonlite’, ‘lubridate’, ‘modelr’, ‘pillar’, ‘purrr’, ‘readr’, ‘readxl’, ‘reprex’, ‘rlang’, ‘rstudioapi’, ‘rvest’, ‘stringr’, ‘tibble’, ‘tidyr’, ‘xml2’, ‘scales’, ‘digest’, ‘viridisLite’, ‘base64enc’, ‘htmltools’, ‘htmlwidgets’, ‘RColorBrewer’, ‘vctrs’, ‘lazyeval’, ‘crosstalk’, ‘data.table’, ‘promises’(들)을 또한 설치합니다.


  There are binary versions available but the source versions are later:
         binary source needs_compilation
vctrs     0.3.8  0.4.0              TRUE
magrittr  2.0.2  2.0.3              TRUE

  Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/sys_3.4.zip'
Content type 'application/zip' length 59888 bytes (58 KB)
downloaded 58 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/bit_4.0.4.zip'
Content type 'application/zip' length 634253 bytes (619 KB)
downloaded 619 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/ps_1.6.0.zip'
Content type 'application/zip' length 774567 bytes (756 KB)
downloaded 756 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/sass_0.4.1.zip'
Content type 'application/zip' length 3639336 bytes (3.5 MB)
downloaded 3.5 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/rappdirs_0.3.3.zip'
Content type 'application/zip' length 58852 bytes (57 KB)
downloaded 57 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/rematch_1.0.1.zip'
Content type 'application/zip' length 16233 bytes (15 KB)
downloaded 15 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/askpass_1.1.zip'
Content type 'application/zip' length 243683 bytes (237 KB)
downloaded 237 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/bit64_4.0.5.zip'
Content type 'application/zip' length 565251 bytes (552 KB)
downloaded 552 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/prettyunits_1.1.1.zip'
Content type 'application/zip' length 37709 bytes (36 KB)
downloaded 36 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/processx_3.5.3.zip'
Content type 'application/zip' length 1251017 bytes (1.2 MB)
downloaded 1.2 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/evaluate_0.15.zip'
Content type 'application/zip' length 79587 bytes (77 KB)
downloaded 77 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/highr_0.9.zip'
Content type 'application/zip' length 46735 bytes (45 KB)
downloaded 45 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/xfun_0.30.zip'
Content type 'application/zip' length 405677 bytes (396 KB)
downloaded 396 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/bslib_0.3.1.zip'
Content type 'application/zip' length 5038447 bytes (4.8 MB)
downloaded 4.8 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/jquerylib_0.1.4.zip'
Content type 'application/zip' length 525864 bytes (513 KB)
downloaded 513 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/tinytex_0.38.zip'
Content type 'application/zip' length 131525 bytes (128 KB)
downloaded 128 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/colorspace_2.0-3.zip'
Content type 'application/zip' length 2650835 bytes (2.5 MB)
downloaded 2.5 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/backports_1.4.1.zip'
Content type 'application/zip' length 110673 bytes (108 KB)
downloaded 108 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/ellipsis_0.3.2.zip'
Content type 'application/zip' length 49019 bytes (47 KB)
downloaded 47 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/generics_0.1.2.zip'
Content type 'application/zip' length 79096 bytes (77 KB)
downloaded 77 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/glue_1.6.2.zip'
Content type 'application/zip' length 172085 bytes (168 KB)
downloaded 168 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/assertthat_0.2.1.zip'
Content type 'application/zip' length 55025 bytes (53 KB)
downloaded 53 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/blob_1.2.2.zip'
Content type 'application/zip' length 48087 bytes (46 KB)
downloaded 46 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/DBI_1.1.2.zip'
Content type 'application/zip' length 742802 bytes (725 KB)
downloaded 725 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/lifecycle_1.0.1.zip'
Content type 'application/zip' length 122967 bytes (120 KB)
downloaded 120 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/R6_2.5.1.zip'
Content type 'application/zip' length 84225 bytes (82 KB)
downloaded 82 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/tidyselect_1.1.2.zip'
Content type 'application/zip' length 206577 bytes (201 KB)
downloaded 201 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/withr_2.5.0.zip'
Content type 'application/zip' length 232648 bytes (227 KB)
downloaded 227 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/gargle_1.2.0.zip'
Content type 'application/zip' length 537786 bytes (525 KB)
downloaded 525 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/uuid_1.0-4.zip'
Content type 'application/zip' length 46311 bytes (45 KB)
downloaded 45 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/cellranger_1.1.0.zip'
Content type 'application/zip' length 104787 bytes (102 KB)
downloaded 102 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/curl_4.3.2.zip'
Content type 'application/zip' length 4322456 bytes (4.1 MB)
downloaded 4.1 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/ids_1.0.1.zip'
Content type 'application/zip' length 123999 bytes (121 KB)
downloaded 121 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/rematch2_2.1.2.zip'
Content type 'application/zip' length 47557 bytes (46 KB)
downloaded 46 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/gtable_0.3.0.zip'
Content type 'application/zip' length 434363 bytes (424 KB)
downloaded 424 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/isoband_0.2.5.zip'
Content type 'application/zip' length 2726816 bytes (2.6 MB)
downloaded 2.6 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/cpp11_0.4.2.zip'
Content type 'application/zip' length 327451 bytes (319 KB)
downloaded 319 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/pkgconfig_2.0.3.zip'
Content type 'application/zip' length 22223 bytes (21 KB)
downloaded 21 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/mime_0.12.zip'
Content type 'application/zip' length 48094 bytes (46 KB)
downloaded 46 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/openssl_2.0.0.zip'
Content type 'application/zip' length 3994689 bytes (3.8 MB)
downloaded 3.8 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/fansi_1.0.3.zip'
Content type 'application/zip' length 365847 bytes (357 KB)
downloaded 357 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/utf8_1.2.2.zip'
Content type 'application/zip' length 209978 bytes (205 KB)
downloaded 205 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/clipr_0.8.0.zip'
Content type 'application/zip' length 54740 bytes (53 KB)
downloaded 53 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/vroom_1.5.7.zip'
Content type 'application/zip' length 2067926 bytes (2.0 MB)
downloaded 2.0 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/tzdb_0.3.0.zip'
Content type 'application/zip' length 1445822 bytes (1.4 MB)
downloaded 1.4 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/progress_1.2.2.zip'
Content type 'application/zip' length 86023 bytes (84 KB)
downloaded 84 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/callr_3.7.0.zip'
Content type 'application/zip' length 437035 bytes (426 KB)
downloaded 426 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/fs_1.5.2.zip'
Content type 'application/zip' length 607988 bytes (593 KB)
downloaded 593 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/knitr_1.38.zip'
Content type 'application/zip' length 1486994 bytes (1.4 MB)
downloaded 1.4 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/rmarkdown_2.13.zip'
Content type 'application/zip' length 3709774 bytes (3.5 MB)
downloaded 3.5 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/selectr_0.4-2.zip'
Content type 'application/zip' length 486985 bytes (475 KB)
downloaded 475 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/stringi_1.7.6.zip'
Content type 'application/zip' length 16449819 bytes (15.7 MB)
downloaded 15.7 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/farver_2.1.0.zip'
Content type 'application/zip' length 1752636 bytes (1.7 MB)
downloaded 1.7 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/labeling_0.4.2.zip'
Content type 'application/zip' length 62679 bytes (61 KB)
downloaded 61 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/munsell_0.5.0.zip'
Content type 'application/zip' length 245162 bytes (239 KB)
downloaded 239 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/fastmap_1.1.0.zip'
Content type 'application/zip' length 215457 bytes (210 KB)
downloaded 210 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/yaml_2.3.5.zip'
Content type 'application/zip' length 209801 bytes (204 KB)
downloaded 204 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/Rcpp_1.0.8.3.zip'
Content type 'application/zip' length 3356145 bytes (3.2 MB)
downloaded 3.2 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/later_1.3.0.zip'
Content type 'application/zip' length 860076 bytes (839 KB)
downloaded 839 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/broom_0.7.12.zip'
Content type 'application/zip' length 1808599 bytes (1.7 MB)
downloaded 1.7 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/cli_3.2.0.zip'
Content type 'application/zip' length 1255211 bytes (1.2 MB)
downloaded 1.2 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/crayon_1.5.1.zip'
Content type 'application/zip' length 160724 bytes (156 KB)
downloaded 156 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/dbplyr_2.1.1.zip'
Content type 'application/zip' length 835942 bytes (816 KB)
downloaded 816 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/dplyr_1.0.8.zip'
Content type 'application/zip' length 1382566 bytes (1.3 MB)
downloaded 1.3 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/dtplyr_1.2.1.zip'
Content type 'application/zip' length 329901 bytes (322 KB)
downloaded 322 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/forcats_0.5.1.zip'
Content type 'application/zip' length 357617 bytes (349 KB)
downloaded 349 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/googledrive_2.0.0.zip'
Content type 'application/zip' length 1873130 bytes (1.8 MB)
downloaded 1.8 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/googlesheets4_1.0.0.zip'
Content type 'application/zip' length 492120 bytes (480 KB)
downloaded 480 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/ggplot2_3.3.5.zip'
Content type 'application/zip' length 4130096 bytes (3.9 MB)
downloaded 3.9 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/haven_2.4.3.zip'
Content type 'application/zip' length 1291601 bytes (1.2 MB)
downloaded 1.2 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/hms_1.1.1.zip'
Content type 'application/zip' length 104079 bytes (101 KB)
downloaded 101 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/httr_1.4.2.zip'
Content type 'application/zip' length 518321 bytes (506 KB)
downloaded 506 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/jsonlite_1.8.0.zip'
Content type 'application/zip' length 1155661 bytes (1.1 MB)
downloaded 1.1 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/lubridate_1.8.0.zip'
Content type 'application/zip' length 1719877 bytes (1.6 MB)
downloaded 1.6 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/modelr_0.1.8.zip'
Content type 'application/zip' length 203050 bytes (198 KB)
downloaded 198 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/pillar_1.7.0.zip'
Content type 'application/zip' length 757179 bytes (739 KB)
downloaded 739 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/purrr_0.3.4.zip'
Content type 'application/zip' length 429935 bytes (419 KB)
downloaded 419 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/readr_2.1.2.zip'
Content type 'application/zip' length 1818140 bytes (1.7 MB)
downloaded 1.7 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/readxl_1.4.0.zip'
Content type 'application/zip' length 1662814 bytes (1.6 MB)
downloaded 1.6 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/reprex_2.0.1.zip'
Content type 'application/zip' length 500399 bytes (488 KB)
downloaded 488 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/rlang_1.0.2.zip'
Content type 'application/zip' length 1720140 bytes (1.6 MB)
downloaded 1.6 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/rstudioapi_0.13.zip'
Content type 'application/zip' length 302641 bytes (295 KB)
downloaded 295 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/rvest_1.0.2.zip'
Content type 'application/zip' length 207361 bytes (202 KB)
downloaded 202 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/stringr_1.4.0.zip'
Content type 'application/zip' length 216794 bytes (211 KB)
downloaded 211 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/tibble_3.1.6.zip'
Content type 'application/zip' length 871951 bytes (851 KB)
downloaded 851 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/tidyr_1.2.0.zip'
Content type 'application/zip' length 1115244 bytes (1.1 MB)
downloaded 1.1 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/xml2_1.3.3.zip'
Content type 'application/zip' length 2912589 bytes (2.8 MB)
downloaded 2.8 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/scales_1.1.1.zip'
Content type 'application/zip' length 559426 bytes (546 KB)
downloaded 546 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/digest_0.6.29.zip'
Content type 'application/zip' length 266555 bytes (260 KB)
downloaded 260 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/viridisLite_0.4.0.zip'
Content type 'application/zip' length 1299496 bytes (1.2 MB)
downloaded 1.2 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/base64enc_0.1-3.zip'
Content type 'application/zip' length 43156 bytes (42 KB)
downloaded 42 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/htmltools_0.5.2.zip'
Content type 'application/zip' length 347464 bytes (339 KB)
downloaded 339 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/htmlwidgets_1.5.4.zip'
Content type 'application/zip' length 905257 bytes (884 KB)
downloaded 884 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/RColorBrewer_1.1-2.zip'
Content type 'application/zip' length 55707 bytes (54 KB)
downloaded 54 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/vctrs_0.3.8.zip'
Content type 'application/zip' length 1255257 bytes (1.2 MB)
downloaded 1.2 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/lazyeval_0.2.2.zip'
Content type 'application/zip' length 173016 bytes (168 KB)
downloaded 168 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/crosstalk_1.2.0.zip'
Content type 'application/zip' length 409507 bytes (399 KB)
downloaded 399 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/data.table_1.14.2.zip'
Content type 'application/zip' length 2600340 bytes (2.5 MB)
downloaded 2.5 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/promises_1.2.0.1.zip'
Content type 'application/zip' length 2320121 bytes (2.2 MB)
downloaded 2.2 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/tidyverse_1.3.1.zip'
Content type 'application/zip' length 430101 bytes (420 KB)
downloaded 420 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/serial_3.0.zip'
Content type 'application/zip' length 56949 bytes (55 KB)
downloaded 55 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/plotly_4.10.0.zip'
Content type 'application/zip' length 3176128 bytes (3.0 MB)
downloaded 3.0 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/magrittr_2.0.2.zip'
Content type 'application/zip' length 238534 bytes (232 KB)
downloaded 232 KB

package ‘sys’ successfully unpacked and MD5 sums checked
package ‘bit’ successfully unpacked and MD5 sums checked
package ‘ps’ successfully unpacked and MD5 sums checked
package ‘sass’ successfully unpacked and MD5 sums checked
package ‘rappdirs’ successfully unpacked and MD5 sums checked
package ‘rematch’ successfully unpacked and MD5 sums checked
package ‘askpass’ successfully unpacked and MD5 sums checked
package ‘bit64’ successfully unpacked and MD5 sums checked
package ‘prettyunits’ successfully unpacked and MD5 sums checked
package ‘processx’ successfully unpacked and MD5 sums checked
package ‘evaluate’ successfully unpacked and MD5 sums checked
package ‘highr’ successfully unpacked and MD5 sums checked
package ‘xfun’ successfully unpacked and MD5 sums checked
package ‘bslib’ successfully unpacked and MD5 sums checked
package ‘jquerylib’ successfully unpacked and MD5 sums checked
package ‘tinytex’ successfully unpacked and MD5 sums checked
package ‘colorspace’ successfully unpacked and MD5 sums checked
package ‘backports’ successfully unpacked and MD5 sums checked
package ‘ellipsis’ successfully unpacked and MD5 sums checked
package ‘generics’ successfully unpacked and MD5 sums checked
package ‘glue’ successfully unpacked and MD5 sums checked
package ‘assertthat’ successfully unpacked and MD5 sums checked
package ‘blob’ successfully unpacked and MD5 sums checked
package ‘DBI’ successfully unpacked and MD5 sums checked
package ‘lifecycle’ successfully unpacked and MD5 sums checked
package ‘R6’ successfully unpacked and MD5 sums checked
package ‘tidyselect’ successfully unpacked and MD5 sums checked
package ‘withr’ successfully unpacked and MD5 sums checked
package ‘gargle’ successfully unpacked and MD5 sums checked
package ‘uuid’ successfully unpacked and MD5 sums checked
package ‘cellranger’ successfully unpacked and MD5 sums checked
package ‘curl’ successfully unpacked and MD5 sums checked
package ‘ids’ successfully unpacked and MD5 sums checked
package ‘rematch2’ successfully unpacked and MD5 sums checked
package ‘gtable’ successfully unpacked and MD5 sums checked
package ‘isoband’ successfully unpacked and MD5 sums checked
package ‘cpp11’ successfully unpacked and MD5 sums checked
package ‘pkgconfig’ successfully unpacked and MD5 sums checked
package ‘mime’ successfully unpacked and MD5 sums checked
package ‘openssl’ successfully unpacked and MD5 sums checked
package ‘fansi’ successfully unpacked and MD5 sums checked
package ‘utf8’ successfully unpacked and MD5 sums checked
package ‘clipr’ successfully unpacked and MD5 sums checked
package ‘vroom’ successfully unpacked and MD5 sums checked
package ‘tzdb’ successfully unpacked and MD5 sums checked
package ‘progress’ successfully unpacked and MD5 sums checked
package ‘callr’ successfully unpacked and MD5 sums checked
package ‘fs’ successfully unpacked and MD5 sums checked
package ‘knitr’ successfully unpacked and MD5 sums checked
package ‘rmarkdown’ successfully unpacked and MD5 sums checked
package ‘selectr’ successfully unpacked and MD5 sums checked
package ‘stringi’ successfully unpacked and MD5 sums checked
package ‘farver’ successfully unpacked and MD5 sums checked
package ‘labeling’ successfully unpacked and MD5 sums checked
package ‘munsell’ successfully unpacked and MD5 sums checked
package ‘fastmap’ successfully unpacked and MD5 sums checked
package ‘yaml’ successfully unpacked and MD5 sums checked
package ‘Rcpp’ successfully unpacked and MD5 sums checked
package ‘later’ successfully unpacked and MD5 sums checked
package ‘broom’ successfully unpacked and MD5 sums checked
package ‘cli’ successfully unpacked and MD5 sums checked
package ‘crayon’ successfully unpacked and MD5 sums checked
package ‘dbplyr’ successfully unpacked and MD5 sums checked
package ‘dplyr’ successfully unpacked and MD5 sums checked
package ‘dtplyr’ successfully unpacked and MD5 sums checked
package ‘forcats’ successfully unpacked and MD5 sums checked
package ‘googledrive’ successfully unpacked and MD5 sums checked
package ‘googlesheets4’ successfully unpacked and MD5 sums checked
package ‘ggplot2’ successfully unpacked and MD5 sums checked
package ‘haven’ successfully unpacked and MD5 sums checked
package ‘hms’ successfully unpacked and MD5 sums checked
package ‘httr’ successfully unpacked and MD5 sums checked
package ‘jsonlite’ successfully unpacked and MD5 sums checked
package ‘lubridate’ successfully unpacked and MD5 sums checked
package ‘modelr’ successfully unpacked and MD5 sums checked
package ‘pillar’ successfully unpacked and MD5 sums checked
package ‘purrr’ successfully unpacked and MD5 sums checked
package ‘readr’ successfully unpacked and MD5 sums checked
package ‘readxl’ successfully unpacked and MD5 sums checked
package ‘reprex’ successfully unpacked and MD5 sums checked
package ‘rlang’ successfully unpacked and MD5 sums checked
package ‘rstudioapi’ successfully unpacked and MD5 sums checked
package ‘rvest’ successfully unpacked and MD5 sums checked
package ‘stringr’ successfully unpacked and MD5 sums checked
package ‘tibble’ successfully unpacked and MD5 sums checked
package ‘tidyr’ successfully unpacked and MD5 sums checked
package ‘xml2’ successfully unpacked and MD5 sums checked
package ‘scales’ successfully unpacked and MD5 sums checked
package ‘digest’ successfully unpacked and MD5 sums checked
package ‘viridisLite’ successfully unpacked and MD5 sums checked
package ‘base64enc’ successfully unpacked and MD5 sums checked
package ‘htmltools’ successfully unpacked and MD5 sums checked
package ‘htmlwidgets’ successfully unpacked and MD5 sums checked
package ‘RColorBrewer’ successfully unpacked and MD5 sums checked
package ‘vctrs’ successfully unpacked and MD5 sums checked
package ‘lazyeval’ successfully unpacked and MD5 sums checked
package ‘crosstalk’ successfully unpacked and MD5 sums checked
package ‘data.table’ successfully unpacked and MD5 sums checked
package ‘promises’ successfully unpacked and MD5 sums checked
package ‘tidyverse’ successfully unpacked and MD5 sums checked
package ‘serial’ successfully unpacked and MD5 sums checked
package ‘plotly’ successfully unpacked and MD5 sums checked
package ‘magrittr’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\user\AppData\Local\Temp\Rtmpywbp38\downloaded_packages

그리고 이걸 치면

library(tidyverse)
library(serial)
library(magrittr)
library(plotly)
listPorts()

이렇게 뜬다.

> library(tidyverse)
-- Attaching packages -------------------------------------------------------------------------------- tidyverse 1.3.1 --
??[30m ggplot2 3.3.5     ??[30m purrr   0.3.4
??[30m tibble  3.1.6     ??[30m dplyr   1.0.8
??[30m tidyr   1.2.0     ??[30m stringr 1.4.0
??[30m readr   2.1.2     ??[30m forcats 0.5.1
-- Conflicts ----------------------------------------------------------------------------------- tidyverse_conflicts() --
x dplyr::filter() masks stats::filter()
x dplyr::lag()    masks stats::lag()
> library(serial)

다음의 패키지를 부착합니다: ‘serial’

The following object is masked from ‘package:base’:

    isOpen

> library(magrittr)

다음의 패키지를 부착합니다: ‘magrittr’

The following object is masked from ‘package:purrr’:

    set_names

The following object is masked from ‘package:tidyr’:

    extract

> library(magrittr)
> library(plotly)

다음의 패키지를 부착합니다: ‘plotly’

The following object is masked from ‘package:ggplot2’:

    last_plot

The following object is masked from ‘package:stats’:

    filter

The following object is masked from ‘package:graphics’:

    layout

> listPorts()
[1] "COM10"

COM 10? 마침 이 명령어를 실행시킬 때 PUTTY란 프로그램이 COM10을 통해 아두이노와 연결된 상태였다. 그래서 떴나?

패키지를 깔기 30분 전 캡쳐한 사진. PUTTY 창 뒤로 R Studio가 보인다.

말 나온 김에 얘기하자면, CMD는 좀 다르다. 거기서 MODE를 치면 연결되어 있는 COM 포트번호가 뜨는 데, PUTTY 실행 중에 MODE를 치면 그런 걸 볼 수 없다. 왜 이런 차이가 생기는지는 추가적인 정보를 찾아봐야겠다. 

 

여기까지 잘 따라왔다면, 모든 준비는 끝난 셈이다. 

 

다음 편에 계속...