2016-01-01ãã1å¹´éã®è¨äºä¸è¦§
å¾æ¥ã®éè¨å¦çãdplyrã«ç½®ãæãã¦ããä¸ã§ããããã¨ã©ã¼ãåºãã Error in function_list[[k]](value) : (list) object cannot be coerced to type 'double' ããã¾ã§ã¯åé¡ãªãéè¨å¦çã§ãã¦ããã®ã«dplyrã使ã£ãé端ãã®ã¨ã©ã¼ã§ããã åé¡ãçªãæ¢â¦
æè¿ã¹ã¯ã¬ã¤ãã³ã°ãã¦ãªãã®ã§ç´ æ¯ãããããã¨ã«ããã ä»åã¯å²¡æé幸ã®Wikipediaè¨äºå ã®çµæ´ã®é ç®ã«ããã人åãæ½åºãã¦çºãã¦ã¿ããã 以ä¸ã®æµãã§é²ããã1. ãã¼ã¸ãçºãã¦ãã¹ã¯ã¬ã¤ãã³ã°ã®å¯¾è±¡ã¨ããæç« ãåãè¾¼ã¾ãã¦ããå ´æãç¹å®ããã â¦
XLConnectã«dplyrçã§æä½ããå¾ã®tblã¯ã©ã¹ã®ãã¼ã¿ãã¤ã£ããã¨ã¨ã©ã¼ãåºãã ãã¨ãã°ä»¥ä¸ã®ãããªã³ã¼ããå®è¡ããã smp <- loadWorkbook("sample.xlsx", create=TRUE) smp["ãµã³ãã«"] <- iris %>% group_by(Species) %>% tally() ããããã¨ã©ã¼ãåºâ¦
ãããªè©±ããããå ¼åæ¯ ï¼2015ï¼ãã¼ãããå§ããRã¼ååæ¼ç®ããå¤å¤é解æã¾ã§ãæ¥ç§æé£ã¯ããµã³ãã«ãã¼ã¿ã®å ¬éããã¦ããªãã®ããªï¼ï¼ AKB48ã®å¹´é½¢ã¨èº«é·ã®ãã¼ã¿ã¨ããæã§å ¨é¨æã¤ã®è¾ããããä¸çºã§å¤æã§ããªããããªååãå¤ããããã pic.twittâ¦
plotlyã§è¤æ°ã®å³ã並ã¹ã¦æãã¨ãã¯subploté¢æ°ãç¨ããã subplotã¨ãããã¼ã¯ã¼ãããè¦ãã¦ããã°ãã¨ã¯æ¤ç´¢ããã¨ãããã§ãä¾ãåºã¦ããã library("ggplot2") library("plotly") g <- ggplot(economics, aes(x = date, y = uempmed)) + geom_line() pâ¦
Rã®plotã®ã°ã©ãã£ãã¯ãã©ã¡ã¼ã¿ã¯è¦ãã«ããã ãããããããã®ç¥ç§°ãä½ã示ãã¦ããããããã°å¤å°ã¯è¦ãããããªãã ãããPaul Murrellãã¾ã¨ãã¦ããã¦ããã https://www.stat.auckland.ac.nz/~paul/R/parMemnonics.html ã»ãã¨ã¯ãããã«ãã«æ²è¼â¦
以ä¸ã®ããã«æ¥æ¬èªã使ãã¨ãTRUE/FALSEãå¿ è¦ãªã¨ãããæ¬ æå¤ã§ããã¨ããã¨ã©ã¼ãåºã¦ã¬ã³ããªã³ã°ãããªãã selectInput('value1', 'å¤', 90:100) ã¨ããããè±åã®ã©ãã«ã«ããã°åé¡ãªãã Windowsã§éçºãã¦CentOSã®Shiny Serverã«ä¸ãã¦ããã®ãåâ¦
curlã¨ãwgetã ã¨ä¸è¡ã ãããã©Rã§ããããã ãªãã¡ã©ã§ã¢ã¯ã»ã¹å¶éãããã¦ããå ´åã®PDFã³ã³ãã³ãã®åå¾ã®ä¸ä¾ã以ä¸ã«ç¤ºãã add_headersã§ãªãã¡ã©ãè¨å®ãã¦GETããå¾ããã¤ããªãã¼ã¿ã¨ãã¦æ¸ãåºãã°è¯ãã library("httr") u <- "ç®çã¨ããURL"â¦
Shiny-serverã§flexdashboardããããã¼ã¤ããæ¹æ³ãããããªãã£ãã®ã§ã¡ã¢ã é常ã¯ä»¥ä¸ã®ãµã¤ãã§ã解説ããã¦ããããã«ui.Rã¨server.Rãæå®ã®å ´æã«è¨ç½®ãã¦ããã°ã http://IPã¢ãã¬ã¹:3838/ãã£ã¬ã¯ããªå ã¨ããå½¢ã§ã¢ã¯ã»ã¹ã§ããã http://estrelâ¦
withProgressãæã£åãæ©ãã messageã«ã¡ãã»ã¼ã¸ãæå®ãã¦ããã®å¾ã«å¾ ã¡æéãçºçããå¦çããããã¯ã§æå®ããã renderText({ withProgress(message = 'è¨ç®ä¸', { input$hoge }) }) åç §ã¯ã©ã¹ã®Progressãç¨ããã¨ããæ¹æ³ããããããã http://sâ¦
flexdashboardãshinyã¢ããªã¨ãã¦ã¬ã³ããªã³ã°ããæã¯renderãããªãã¦runã flexdashboard::flexdashboard()ã®exampleã«ã¯htmlã«ã¬ã³ããªã³ã°ããä¾ãè¼ã£ã¦ããã®ã§ééããã¡ã rmarkdown::run("dashboard.Rmd")ã¡ãªã¿ã«ãã£ããrenderããã¨ã以ä¸ã®ãâ¦
ãããªè©±ããããpaste0("aiueo", 1, 2, sep = "=", collapse = "&")[1] "aiueo12=" #ã¸ããªã®Râ Shinya Uryu (@u_ribo) August 18, 2016 çµè«ããããã°ãä¸é£ãããï¼...ï¼ã§å¼æ°ãåããï¼å¼æ°ã®ãã§ãã¯ãæ示çã«è¡ããªãã£ãçµæã ã¨æãããã åå ãâ¦
ãªãã¹ãçµã¿è¾¼ã¿é¢æ°ã§å¦çããããintToBitsé¢æ°ã使ãã®ãè¯ãããã 以ä¸ã¯16æ¡ã®2é²æ°ã§è¡¨ç¾ãã¦ããã > paste(rev(as.integer(intToBits(10739))[1:16]), collapse="") [1] "0010100111110011"
æè¿readrããã±ã¼ã¸ã1.0ã«ãªã£ãã https://blog.rstudio.org/2016/08/05/readr-1-0-0/ ãã®ä¸ã§ãå®é¨çã ããã¨ããæãã¤ãã§read_csv_chunkedé¢æ°ãæå¾ã«ç´¹ä»ããã¦ããã ã¡ã¢ãªã«ä¹ããªããããªãã¼ã¿ãåå²ãã¦èªã¿è¾¼ããã¨ãã§ããã baseã®read.â¦
Anacondaçµç±ã§å ¥ããjupyter notebookã®nbextensionã使ãããã ç¹ã«ãè¦åºããtocã§ã¾ã¨ãã¦ããã"Table of Contents (2)"ã使ãããã ããã以ä¸ã®ãããªã¡ãã»ã¼ã¸ãåºã¦ãhttp://localhost:8888/nbextensions/ ã«ã¢ã¯ã»ã¹ã§ããªãã "Config option â¦
Jupyter notebookã¨ãããIPythonã®rmagicã使ã£ã¦ã¦ã%Rã¨%%Rã®éããããããªãã£ãã®ã§èª¿ã¹ãã %ã¨ãã表è¨ã®åé¡ã§ãããã°ã°ãã«ããã®ã§ã¡ã¢ãã¦ããã çµè«ããè¨ãã¨ã%1ã¤ã ã¨line magicã%%2ã¤ã ã¨cell magicã§ããã magic function IPythonã«ã¯â¦
ãã®1å¹´ã»ã©fitbitã§æ©æ°ãã¼ã¿ãåãç¶ãã¦ããã æè¿ãæ©æ°ãã¼ã¿ã¯1æ¥ãããå°ããåä½ï¼1åã15åï¼ã§åå¾ã§ãããã¨ãç¥ã£ãã®ã§ããããå©ç¨ãã¦æ¥ã ã®è¡åããã¿ã¼ã³åãããã åæã«ææã¡ã®ç¡ç ãã¼ã¿ã¨çµã¿åããã¦ãè¡åãã¿ã¼ã³ã¨ã®é¢é£ãè¦ãâ¦
以åcaptionããã±ã¼ã¸ã使ã£ã¦ãããããèªåã§ç»åã«ã¤ãã話ãããã ããããããã£ãç»åãè¦ã¦ããã¨ã©ããã¦ãè½æ¸ãããããªãã ãã¤ã³ãã½ãããéãã¦è½æ¸ããã¦ãããã®ã ãããã¯ã·ã¼ã ã¬ã¹ã«Rããããããã ã¨ãããã¨ã§rakugakié¢æ°ãcaptioâ¦
dygraphsããã±ã¼ã¸ã®ãã¨ã§ããã ãã£ããã¾ããdygraphsï¼ãã³ãï¼ã¨æãããåããããã ããããæè¿ãç§ã®è¨æ¶ããã°ãã æã¯è¨æ¶ã«éãªã¯ã¨ãªï¼ä¾ï¼Rã§ããæãã«æç³»åãããããããããã±ã¼ã¸ï¼ãæãã¦ããæé©ãªçµæãスッã¨ã§ã¦ããã®ãæè¿ã¯ç¡â¦
geom_lineããã¨ããNAãå ¥ã£ã¦ããã¨ããã§ç·ãéåãã¦ãã¾ãã library("ggplot2") smp <- data.frame(x = 1:5, y = c(1:3, NA, 5)) ggplot(smp, aes(x = x, y = y, group = 1)) + geom_line() + geom_point() ãããããNAãé¤ãã¦ããã°ãç·ãã¤ãªãã§â¦
æ¨æ¥ã®ç¶ãã ãããèªåã§ããããã http://togetter.com/li/931610 ã¨ãããã¨ã§é¢æ°ã追å ããã ã¤ãã§ã«ãã©ã³ããå¤æ´ã§ããããã«ããã ä¸è¨ã³ã¼ãã§outputã¨ããååã§ç»åãåºåã§ããã ã¡ãªã¿ã«ãã®ç»åã¯Googleæ§ããã®ããã«å¤å®ããã®ã§ããâ¦
ãããã話ãããã http://memo.sanographix.net/post/140968243125 åãããã«Rã§ãã£ã¨ãããããã¤ãããã®ã ãè¦ã¤ããããªãã£ãã®ã§ä½ã£ãã ãããªæãã§ãããããã¤ããããã # ã¤ã³ã¹ãã¼ã« install_github("dichika/caption") library(caption)â¦
以ä¸ã®çµæã§ã©ã¡ããéããã¡ãã£ã¨èãã¦ã¿ã¦ã»ããã > library("microbenchmark") > microbenchmark(mean(iris$Sepal.Length), mean.default(iris$Sepal.Length)) çµæã¯ãã¡ããmean.defaultã®æ¹ãéãã Unit: microseconds expr min lq mean median uâ¦
tweedieåå¸ã使ã£ãã¢ããªã³ã°ã«ã¤ãã¦ã¯ä»¥ä¸ã®Revolutionsã®ããã°ããRã§å¦ã¶ãã¼ã¿ãµã¤ã¨ã³ã¹10 ä¸è¬åç·å½¢ã¢ãã«ããtwitterãªã©ã§è¦ããã¦æ°ã«ãªã£ã¦ããã http://blog.revolutionanalytics.com/2014/10/a-note-on-tweedie.html tweedieåå¸ã¨ã¯ tweeâ¦
ããããããããæåã«ãã£ã¦éãè²ã«ãªãããã ãª/ã¹ã¼ãã¼ã§è²·ã£ããã®ã®æ é¤ãã¼ã¿ãè²ã§è¦è¦çã«è¡¨ç¤ºããã¬ã·ã¼ã https://t.co/t0XlOZ3Gh2â æ©æ¢°ã®ä½ãæã«å ¥ããã®ãéé (@tetsuroito) 2016å¹´2æ24æ¥ ã¬ã·ã¼ãã¯ãã®éã®é£²ã¿ä¼ã®ããã ããã«Googleâ¦
ç´ ã®randomForestãªãã¦æè¿ã¯ä½¿ããã¨ããªããã£ã±ãcaretããrangerã使ã£ã¦ããã®ã ããpartial dependence plotã使ãããã£ãã®ã§ä¹ ãã¶ãã«è§¦ã£ããã¨ã©ã¼ã«æ©ã¾ãããã®ã§ã¡ã¢ã 件ã®ã¡ãã»ã¼ã¸ã¯ããã randomForest.default(m, y, ...) ã§ã¨ã©ã¼: â¦
Google Cloud Vision APIãé«æ§è½ãããã®ã§ä½¿ãããã®ã ãç§ã¯Rãã使ããªãã®ã§Rãã使ãã ã¨ããããææã¡ã®ãã®ç»åã®OCRããããã åæºåã¨ãã¦APIãã¼ã®åå¾ãªã©ãããã®ã§ä»¥ä¸ãåèã«ããããã http://qiita.com/takaheraw@github/items/e2d8ac9â¦
ãµã¼ã¢ã°ã©ãã£ã¿ãããªãã¼ãããããggplot2ã§æãããã ãã¨ãã°ä»¥ä¸ã®irisãã¼ã¿ã®ããããã ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width))+ geom_point(color = "black") ç¹ãå¯éãã¦ããã¨ããã赤ããèãã¨ãããç·ã§å¡ãããã ãããâ¦
訳è ããæ¬ãããã ãã¾ããï¼ãããã¨ããããã¾ãï¼ è¡¨ç´ãè£è¡¨ç´ã«ç¦ç¶ã¨è¼ãã¨ã©ã¼ã¡ãã»ã¼ã¸ãè¦åã¡ãã»ã¼ã¸ãç®ã«çªãåºããã¾ããï¼ æ¬æããã£ã¨èªãã§å°è±¡ã«æ®ã£ãä¸æã¯P116ã®ãã¡ãã§ãã åé¡ãå¼ãèµ·ããã®ã¯Rã§ã¯ãªãããããã¦ã¼ã¶ã®å´ã ãâ¦
æµãã§fitbit HR chargeã¨Jawbone UP3ãå ¥æã§ããã®ã§ãåããã¤ã¹ã§åå¾ããç¡ç ãã¼ã¿ãæ¯è¼ãããã ä»åã¯ã¾ããã¼ã¿ãåå¾ããã¨ããã¾ã§ã ã¿ã¼ã²ããã¨ãããã¼ã¿ fitbitã¯ä»¥ä¸ã®ãããªå³ãæãããã®ãã¼ã¿ã欲ããã Jawboneã以ä¸ã®ãããªæããâ¦