2011-01-01ãã1å¹´éã®è¨äºä¸è¦§
以ä¸ãåç §ã http://stackoverflow.com/questions/7523427/ddply-with-lm-function ä¸æ¦å帰ã®çµæããªã¹ãã«å ¥ãã¦ãcoefããanovaã§ç®çã®ãã®ãå¼ãåºãã¨ããæãã res <- dlply(iris, .(Species), lm, formula = Sepal.Length~Sepal.Width) coefs <- â¦
åå¼·ä¼ã«ã©ããªäººãæ¥ã¦ãããç¥ãããå ´åç»é²ããã¦ããtwitterIDãããããã£ã¼ã«ã調ã¹ãã®ãæã£ã¨ãæ©ããä¸ä»¶ä¸ä»¶èª¿ã¹ãã®ã¯ããã©ããããããã¾ã§ä¿ºã¯ä»äººã«èå³ããªããå¾ã£ã¦ä¸è¦§ã§ããããã®ãã²ããã§ããã¨å¬ããã®ã§Rã§æ¸ããã getATNDprof â¦
R Advent Calendar 2011 ã3æ¥ç®ã¨ãããã¨ã§ç§ã«ãé çªãåã£ã¦ããã ã¨ãããã¨ã§æ´æ°ãRã¨ã¨ã¯ã»ã«ãã¤ãªãããã±ã¼ã¸ã¨ãã¦XLConnectã¨ãã便å©ãªãã®ãããã 以åTokyo.Rã§å°ãç´¹ä»ããã®ã ããããã©ãã®ã§æ¸å¼æå®ã®è©±ã«ã¤ãã¦ã¯è§¦ããªãã£ãã httâ¦
Rã§ãããããã¼ãã«ãå®ç¾ããããã®reshape2ããã±ã¼ã¸ã«ã¤ãã¦ã¯id:a_bickyããã®ç´ æ´ããã解説è³æãããã http://www.slideshare.net/abicky/r-10128090/ãããèªãã§ãï¾ï½¬ï½¯ï¾ï½±ï½±ï½±ï½±ï½±ï½±ï½±ã¨ããæãã§ã¯ãã¹éè¨ãããã¾ãããã¨ããããã§ãã library(resâ¦
é常ãé¢æ°æç»ã¯curveé¢æ°ã使ãã°è¯ãã curve(x^2, -3, 3) curve(dnorm, -3, 3) ãããggplot2ã§å®ç¾ããããã«ã¯stat_functionã使ãã°è¯ããå°ãããªããã¼ã å®ç¾©åãä¸æ¦æç»ãã¦geom_blankã§æ¶ããå¾ãstat_functionã§é¢æ°ãæç»ããã library(ggplâ¦
æ©æ¢°å¦ç¿ãåå¼·ãã¦ããã¨æé©åã®è©±ããã³ãã³åºã¦ããã åé¢ã ãã¿ã¦ããã£ãæ°ã«ãªãã®ã ãå®è£ ãã¦ã¿ãªããã¨ã«ã¯ã©ãã¾ã§ç解ãã¦ãã®ãæªããã ã¨ãããã¨ã§ã¾ãã¯ç°¡åãããªãã¥ã¼ãã³æ³ãå®è£ ãã¦ã¿ãã # é¢æ°ãå®ç¾© txt <- "x^3 + 2*x^2 + 3*x +â¦
R2.14.0ãããªãã ãªãªã¼ã¹ãããä¸éã¯ä¸¦åå¦çãããã¤ãã³ã³ãã¤ã«ã§æµ®è¶³ç«ã£ã¦ããã¾ãã ãããªä¸ãCairoãwindowsãã¤ããªã§ããµãã¼ãããããã¨ã«çãããæ°ã¥ãã§ããããã http://ja.wikipedia.org/wiki/Cairo type="cairo"ãªã©ã¨æå®ãããã¨ã§â¦
ãããªã®ãããã http://www.google.org/flutrends/ ãã¼ã¿ãå ¬éããã¦ããã®ã§ããã£ã¦ã¿ãã¨è¯ãã 試ãã«å¯è¦åããã¨ãããªæãã ååçã¨ååçã§ã¯ãã¯ãæµè¡ã®ææããããã df <- read.csv("http://www.google.org/flutrends/data.txt",header=Tâ¦
ããã«ããããã«animationããã±ã¼ã¸ã¨Imagemagickã使ãã°Rã®ãããããããæ軽ã«ã¢ãã¡ã¼ã·ã§ã³ãä½ããããã ããImagemagickãã¤ã³ã¹ãã¼ã«ããã®ãã ããã ãã®ãµã¤ãã®ããã«ç»åãã¢ããããã°gifã¢ãã¡ãä½ã£ã¦ãããã¨ãããããããä¸æ¬ã§ã¢ãâ¦
ï¼åç §ï¼http://wiki.stdout.org/rcookbook/Graphs/Facets%20(ggplot2)ããæ¹ã¯ä»¥ä¸ã®2ã¤ã ã©ãã«åãå¤æ´ããé¢æ°ãå®ç¾©ãã¦facet_gridã®labellerã«æå®ãã ãã¼ã¿ã®å åæ°´æºãå¤æ´ãã
åå¼·ä¼ã®åä»è¡¨ãä½ãå¿ è¦ããããå½åã¯ä¸»å¬è ãcsvã§åå è ä¸è¦§ãè½ã¨ãã¦ãã¦ãããGoogleDocsã«ã¢ãããã¦ãªã©ã¨ãã£ã¦ããã®ã ãã©ãã«ã主å¬è ã¸ã®è² æ ãããããããã æ¢ãã¨åºæ¬ 確èªAPIãªããã®ãããã http://api.atnd.org/#users ãããGoogleDoâ¦
APIã使ã£ã¦ãã¼ã¿ãåã£ã¦ãããç¶æ³ãããã¨æãã¾ãã ãããªæã¯RCurlã§ã²ãããã¦ãã¦ãJSONå½¢å¼ã§ããã°RJSONIOãXMLã§ããã°XMLã使ãã°ããã èªåã®å ´åãJSONã®æ¹ãæ±ããããå°è±¡ãããã®ã§JSONã§ã¨ããæã¯JSONã§ã¨ããã¨ã«ãã¦ãã¾ãã 以ä¸ã³â¦
Rã§åæããçµæãã¨ã¯ã»ã«æ¹ç¼ç´ã«å©ããã¾ãªããã°ãããªãç¶æ³ãããã¨æãã¾ãã XLConnectããã±ã¼ã¸ã使ãã¨ãã®è¾ºãç°¡åã«ã§ããã®ã§ãã²ã試ãããã 以ä¸ã¯ãã¼ã¿ã¨ç»åãããããå¥ã®ã·ã¼ãã«æ¸ãããã³ã¼ãã ä»ã«ãã»ã«ã®æ¸å¼ãæå®ããããé¢æ°â¦
ã³ã¬ã¹ãã³ãã³ã¹åæã¯ã¯ãã¹éè¨ã®å¯è¦åã«ä¾¿å©ã§ããã æ£å¸å³ãããã«ã¸ã¥ã¢ã«ã«ä½¿ããããã«ãªã£ã¦ããã¨è¯ãã¨ã®è©±ãèããã®ã§ãæ§å¹´ä»£å¥ã«ã³ã¬ã¹ãã³ãã³ã¹åæãè¡ãããããããé¢æ°ãæ¸ããã ææããªã®ã§ãã¼ã¿ã§sexã«æ§å¥ãage10ã«10æ³å»ã¿ã®â¦
ã¯ã©ã¹ã¿ãªã³ã°ãkmeansãªããªããªãã§è¡ã£ãå¾ãæ£å¸å³ããã®çµæã§è²åãããããããã¨ãããããããã§ãã ãã§ããã®å¤æ°ã¨ãã®å¤æ°ã®çµåãã ã£ããã©ãã ããã¨å¤æ°ãå ¥ãæ¿ãã¦ãã£ããããããã§ããããã©ãããã ãã®è¾ºã¯GUIã§ã²ããã²ããã¨ãâ¦
googleVisããã±ã¼ã¸ã®ãã¼ã¸ã§ã³ã0.2.9ã«ä¸ãã£ã¦ãã°ã©ãç·¨éãã¿ã³ãã¤ããããããã«ãªã£ããä¸é¨ã®ãEdit meããæ¼ãã¨ã°ã©ãç·¨éç»é¢ããããã¢ããã§è¡¨ç¤ºãããã ä»»æã®ã°ã©ããé¸ãã§ãå³ä¸é¨ã®OKãæ¼ãã¨åãæ¿ããï¼ä¸ã®ä¾ã§ã¯è¡¨ç¤ºç¯å²ãéå®ãâ¦
ã¡ãã£ã¨æã®ã¡ã¢ãæ´çãã¦ãå ¬éãã¦ããããã¼ã¿èåï¼data fusionï¼ã¨ããææ³ãããã ä¾ãã°ããããç¹å®ã®æ§è³ªãæãã製åããããç¹å®ã®ã¿ã¼ã²ãããã©ããããè³¼å ¥ããããã¨ãã£ãåé¡ã«å¯¾ãã¦ããåºåæ¥è§¦ã®å¤æ°ãã¨ã購買ã®å¤æ°ããåä¸å¯¾è±¡è â¦
ã«ã«ãã°ã©ã ã¨ã¯çµ±è¨ãã¼ã¿ã«åºã¥ãã¦é¢ç©ãè·é¢ã伸縮ããå°å³ã®ãã¨ã 以ä¸ã®ãµã¤ãã§Scapetoadã¨ããã½ããã使ã£ãäºä¾ãæ²è¼ããã¦ãã¦ãããããã¦ãããããã¦ããã®ã ããªããèªåã®ç°å¢ã§ã¯ãã¾ãåããªãã http://d.hatena.ne.jp/naraba/2011082â¦
datamarket.comã¨ãããµã¤ããããã http://datamarket.com/ ä¸çã®å ¬éãã¼ã¿ãçã£ç«¯ããéãã¦ããå¯è¦åã¾ã§ãã¦ããã¦ããã æè¿ãããããã¼ã¿ãã²ã£ã±ã£ã¦ãããrdatamarketã¨ããããã±ã¼ã¸ãå ¬éãããã ãã£ãããªã®ã§ãããããã¼ã¿ã2ã¤æå®â¦
zoom.itã¨ãããµã¤ããããã http://zoom.it/ ç»åã縮å°ã»æ¡å¤§ã«å¼·ããã¯ã¿ã¼ã°ã©ãã£ãã¯ã¹å½¢å¼ã§ããSVGå½¢å¼ã«å¤æãã¦ãããã®ã§ç´°ããæåãå¤ããããã¯ã¼ã¯å³ãã¯ã¼ãã¯ã©ã¦ããªã©ãè²¼ãã¤ããéã«éå®ããã ãã ãç»åã®åãè¾¼ã¿ã«javascriptã使â¦
kindleçãåã®çã®ãã®ã ã¨ç¥ããã«ãã£ããR graphics kindleãã½ã¡ã£ã¦ãã¾ã£ãããã§ãã ããã§ãã£ã³ã»ã«ãããã¨ããã®ã§ãããæ°ã¥ããã®ãå°ãé ããã£ã³ã»ã«ãã¿ã³ã表示ããã¦ããªãã ä»æ¹ãªãã®ã§ä¸è¨ã®ãããªã¡ã¼ã«ãåãåããçªå£ããéä»ãâ¦
treemapã®ä½¿ç¨ä¾ã¨ãã¦ã¡ãã»ãè¦ãããã®ããã£ã¬ã¯ããªã®é層æ§é ãå¯è¦åããã¨ãããã®ããã¸ã¥ã¢ã©ã¤ã¸ã³ã°ã»ãã¼ã¿ âProcessingã«ããæ å ±è¦è¦åææ³ä½è : Ben Fry,å¢äºä¿ä¹(ç£è¨³),å è¤æ ¶å½¦åºç社/ã¡ã¼ã«ã¼: ãªã©ã¤ãªã¼ã¸ã£ãã³çºå£²æ¥: 2008/12/01ã¡ãâ¦
wordcloudã¯é »åº¦ã«å¿ãã¦è²ãå¤ãããããªè¨å®ã«ãªã£ã¦ããããããããé »åº¦ã¯æåã®å¤§ããã§è¡¨ãããã®ã§è²ã¯å¥ã®æ å ±ã«ä½¿ãããã ã¨ãããã¨ã§å°ãæ¸ãæããã ããã«ãããå©ç¨ãã¦clpcloudãæ¸ãæããã®ã§ã試ãããã #wordcloudãã¡ãã£ã¨å¤æ´ãã â¦
é¢æ°ã¯ã¡ãã£ã¨æç´ããããã æ¥æ¬èªãã©ã³ãã¯ãããããwindowsFontsã§è¨å®ããä¸ã§å¼æ°ã«ãfamily=ãªãã¨ããã¨ä¸ãã¦æç»ããã #é¢æ°ãå®ç¾©ãã¦ãã clpcloud <- function(type=NULL, min=1, ...){ require(RMeCab) require(wordcloud) require(plyr) â¦
wordcloudã¨ããã©ã¤ãã©ãªãåºã¦ããã ãªã®ã§ãä»ã³ãããã¦ãããã¹ãããã¯ã¼ãã¯ã©ã¦ããä½ãé¢æ°ãæ¸ããã enjoy!! clpcloud <- function(type=NULL){ require(RMeCab) require(wordcloud) require(plyr) require(RColorBrewer) if( .Platform$OS.typâ¦
ãã£ã¡ã¸ãµããµãããã£ã¡ã¸ãµããµãããã¡ãªã®ã§ä¸æ¦æ´çã å¦çã®æµã ãã¼ã¿åå¾ï¼ããã£ã¦ãããwebããåå¾ ãã¼ã¿ãã³ããªã³ã°ã»çµ±è¨å¦çï¼R(大è¦æ¨¡ãã¼ã¿ã®å ´åã¯ãµã³ããªã³ã°ãã¾ãã¯Hadoopçã®åæ£å¦çãèæ ®) å¯è¦åï¼RãHTMLãopenFrameworks(Cinâ¦
tmããã±ã¼ã¸ã¯ãã¾ãæ¥æ¬èªã®æ å ±ããªãã RMeCabã®ç³ç°å çã®ãµã¤ã http://rmecab.jp/wiki/index.php?R_fromOldHtml3_2#ead6f07aä»æ¹ãªãvignetteãèªãã ã®ã§æç²ãã¦ã¡ã¢ã¨ãã¦æ®ãã¦ããã ãã¡ã¤ã«çã®èªã¿è¾¼ã¿ ãã£ã¬ã¯ããªã§æå®DirSource ãã¯ãã«â¦
使ããã¼ã¿ã¯å»çä¿éºå»çè²»ãã¼ã¿ãã¼ã¹ã®å»çè²»ç·è¨ï¼âããã¦ã³ãã¼ãï¼ã http://www.mhlw.go.jp/bunya/iryouhoken/iryouhoken14/xls/01.xls library(googleVis) library(XLConnect) wb <- loadWorkbook("01.xls") #ãã¡ã¤ã«ï¼ã¯ã¼ã¯ããã¯ï¼ãæå®ãã gâ¦
å¡ä¾ã ã®ã©ãã«ã ã®ããããã¨ãå¤ã ããã®ã§ã¡ã¢ã last_plot() + opts(axis.text.x=theme_text(angle=90, size=20, hjust=1, vjust=1), axis.text.y=theme_text(angle=90, size=20, hjust=1, vjust=1), plot.title=theme_text(angle=90, size=20, hjust=1,â¦
ã¨ã¯ã»ã«2007ãã¼ã¿ï¼æ¡å¼µåxlsxï¼ãèªã¿è¾¼ã¿ãããã ãã©æå ã«ã¯windows7ã¨Rãããªããã¨ã¯ã»ã«ã¯ãªããJavaã¯ããããããªç¶æ³ããã¾ãããã ãããªæã¯XLConnectããã±ã¼ã¸ã使ãã¾ãã http://cran.r-project.org/web/packages/XLConnect/index.html以â¦