2014-04-01ãã1ã¶æéã®è¨äºä¸è¦§
æ©æ¢°å¦ç¿ããã«ã½ã³ã«è¡ã£ã¦ãã¾ããã ä¼å ´ã¯ãç§èåã¢ã³ãã¼ã°ã©ã¦ã³ããã¢ããã«ã¯å¦ã«è¦ªè¿æãè¦ãã¾ãã ãã¼ãã¯ãæ©æ¢°å¦ç¿ã使ã£ã¦ãªã«ãããããã¨ãããã¨ã§ã使ããã¼ã¿ã¯èªç±ãææ³ãèªç±ãR使ã£ã¦ãããããsklearn使ã£ã¦ãããããèªåã§ã¢ã«â¦
é£æ³é åã®ãã¼ã«ã°ã«ã¼ãã®ååã使ãã°ãkã éè¨ãããã¡ã¤ã«ââ hoge.txt ããã 230 ããã 300 ã°ãªãª 190 ã°ãªãª 190 ã¿ãã 110 ããã 310 ã°ãªãª 190 ã¿ãã 110 ã¿ãã 130 awkãã¡ã¤ã«ââ sum.awk { sum[$1]+=$2 }; END { for (key in sum) { prinâ¦
åè¨ãå¹³åãåæ£ãæ¨æºåå·® åæ¹åã®éè¨ããã¥ãããªã£ã¦æã£ã¦ããã©ãfor (i=1;i<=NF;i++)使ã£ã¦æ¥½ãã³ã éè¨ãããã¡ã¤ã«ââ hoge.txt 840 394 783 798 911 197 335 768 277 553 477 628 364 513 952 916 awkãã¡ã¤ã«ââ sum.awk BEGIN { print "sum", "â¦
awkã§éè¤è¡ãé«éåé¤ããã è¡ã®éè¤åé¤ã§èª¿ã¹ãã¨ããåºã¦ããã®ããsort & uniqã使ã£ãã³ãã³ãã ã½ã¼ãã¯ãã¡ã¤ã«ã大ãããªãã¨ãå®è¡ã«ããªãæéãããã£ã¦ãã¾ãã¾ããã ã½ã¼ãããã«é«éå®è¡ã§ããã®ãã次ã®awkã³ãã³ãã awk '!colname[$1]+â¦