{"id":1218,"date":"2023-07-27T06:02:37","date_gmt":"2023-07-27T06:02:37","guid":{"rendered":"https:\/\/statorials.org\/ja\/r-%e3%81%ae%e5%88%86%e9%a1%9e%e6%9c%a8%e3%81%a8%e5%9b%9e%e5%b8%b0%e6%9c%a8\/"},"modified":"2023-07-27T06:02:37","modified_gmt":"2023-07-27T06:02:37","slug":"r-%e3%81%ae%e5%88%86%e9%a1%9e%e6%9c%a8%e3%81%a8%e5%9b%9e%e5%b8%b0%e6%9c%a8","status":"publish","type":"post","link":"https:\/\/statorials.org\/ja\/r-%e3%81%ae%e5%88%86%e9%a1%9e%e6%9c%a8%e3%81%a8%e5%9b%9e%e5%b8%b0%e6%9c%a8\/","title":{"rendered":"R \u3067\u5206\u985e\u6728\u3068\u56de\u5e30\u6728\u3092\u5f53\u3066\u306f\u3081\u308b\u65b9\u6cd5"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">\u4e00\u9023\u306e\u4e88\u6e2c\u5909\u6570\u3068<a href=\"https:\/\/statorials.org\/ja\/\u5909\u6570\u306e\u8aac\u660e\u5fdc\u7b54\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u5fdc\u7b54\u5909\u6570\u306e<\/a>\u9593\u306e\u95a2\u4fc2\u304c\u7dda\u5f62\u306e\u5834\u5408\u3001<a href=\"https:\/\/statorials.org\/ja\/\u91cd\u7dda\u5f62\u56de\u5e30\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u91cd\u7dda\u5f62\u56de\u5e30<\/a>\u306a\u3069\u306e\u65b9\u6cd5\u3067\u6b63\u78ba\u306a\u4e88\u6e2c\u30e2\u30c7\u30eb\u3092\u751f\u6210\u3067\u304d\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u305f\u3060\u3057\u3001\u4e00\u9023\u306e\u4e88\u6e2c\u5909\u6570\u3068\u5fdc\u7b54\u306e\u9593\u306e\u95a2\u4fc2\u304c\u3088\u308a\u8907\u96d1\u306a\u5834\u5408\u3001\u591a\u304f\u306e\u5834\u5408\u3001\u975e\u7dda\u5f62\u624b\u6cd5\u306e\u65b9\u304c\u3088\u308a\u6b63\u78ba\u306a\u30e2\u30c7\u30eb\u3092\u751f\u6210\u3067\u304d\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u305d\u306e\u3088\u3046\u306a\u65b9\u6cd5\u306e 1 \u3064\u304c<a href=\"https:\/\/statorials.org\/ja\/\u5206\u985e\u6728\u3068\u56de\u5e30\u6728\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u5206\u985e\u56de\u5e30\u30c4\u30ea\u30fc<\/a>(CART) \u3067\u3059\u3002\u3053\u308c\u306f\u3001\u4e00\u9023\u306e\u4e88\u6e2c\u5b50\u5909\u6570\u3092\u4f7f\u7528\u3057\u3066\u3001\u5fdc\u7b54\u5909\u6570\u306e\u5024\u3092\u4e88\u6e2c\u3059\u308b\u6c7a\u5b9a\u6728\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u5fdc\u7b54\u5909\u6570\u304c\u9023\u7d9a\u578b\u306e\u5834\u5408\u306f\u56de\u5e30\u30c4\u30ea\u30fc\u3092\u69cb\u7bc9\u3067\u304d\u3001\u5fdc\u7b54\u5909\u6570\u304c\u30ab\u30c6\u30b4\u30ea\u578b\u306e\u5834\u5408\u306f\u5206\u985e\u30c4\u30ea\u30fc\u3092\u69cb\u7bc9\u3067\u304d\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001R \u3067\u56de\u5e30\u30c4\u30ea\u30fc\u3068\u5206\u985e\u30c4\u30ea\u30fc\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/span><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u4f8b 1: R \u3067\u306e\u56de\u5e30\u30c4\u30ea\u30fc\u306e\u69cb\u7bc9<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u3053\u306e\u4f8b\u3067\u306f\u3001 <strong>ISLR<\/strong>\u30d1\u30c3\u30b1\u30fc\u30b8\u306e<strong>Hitters<\/strong>\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u306f\u3001263 \u4eba\u306e\u30d7\u30ed\u91ce\u7403\u9078\u624b\u306b\u95a2\u3059\u308b\u3055\u307e\u3056\u307e\u306a\u60c5\u5831\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u3053\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3001<em>\u30db\u30fc\u30e0\u30e9\u30f3\u3068\u51fa\u5834<\/em><em>\u5e74\u6570<\/em>\u306e\u4e88\u6e2c\u5909\u6570\u3092\u4f7f\u7528\u3057\u3066\u7279\u5b9a\u306e\u9078\u624b\u306e<em>\u5e74\u4ff8<\/em>\u3092\u4e88\u6e2c\u3059\u308b\u56de\u5e30\u30c4\u30ea\u30fc\u3092\u69cb\u7bc9\u3057\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u3053\u306e\u56de\u5e30\u30c4\u30ea\u30fc\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f\u3001\u6b21\u306e\u624b\u9806\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u30b9\u30c6\u30c3\u30d7 1: \u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">\u307e\u305a\u3001\u3053\u306e\u4f8b\u306b\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #993300;\">library<\/span> (ISLR) <span style=\"color: #008080;\">#contains Hitters dataset<\/span>\n<span style=\"color: #993300;\">library<\/span> (rpart) <span style=\"color: #008080;\">#for fitting decision trees<\/span>\n<span style=\"color: #993300;\">library<\/span> (rpart.plot) <span style=\"color: #008080;\">#for plotting decision trees\n<\/span><\/strong><\/pre>\n<p><span style=\"color: #000000;\"><strong>\u30b9\u30c6\u30c3\u30d7 2: \u521d\u671f\u56de\u5e30\u30c4\u30ea\u30fc\u3092\u69cb\u7bc9\u3057\u307e\u3059\u3002<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">\u307e\u305a\u3001\u5927\u898f\u6a21\u306a\u521d\u671f\u56de\u5e30\u30c4\u30ea\u30fc\u3092\u69cb\u7bc9\u3057\u307e\u3059\u3002 \u300c\u8907\u96d1\u3055\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u300d\u3092\u8868\u3059<strong>cp<\/strong>\u306b\u5c0f\u3055\u306a\u5024\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u30c4\u30ea\u30fc\u304c\u5927\u304d\u3044\u3053\u3068\u3092\u4fdd\u8a3c\u3067\u304d\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u3053\u308c\u306f\u3001\u30e2\u30c7\u30eb\u5168\u4f53\u306e R \u4e8c\u4e57\u304c\u5c11\u306a\u304f\u3068\u3082 cp \u3067\u6307\u5b9a\u3055\u308c\u305f\u5024\u3060\u3051\u5897\u52a0\u3059\u308b\u9650\u308a\u3001\u56de\u5e30\u30c4\u30ea\u30fc\u3067\u3055\u3089\u306b\u5206\u5272\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u6b21\u306b\u3001 <strong>printcp()<\/strong>\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u30e2\u30c7\u30eb\u306e\u7d50\u679c\u3092\u51fa\u529b\u3057\u307e\u3059\u3002<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #993300;\"><span style=\"color: #008080;\">#build the initial tree\n<\/span><span style=\"color: #000000;\">tree &lt;- rpart(Salary ~ Years + HmRun, data=Hitters, control=rpart. <span style=\"color: #3366ff;\">control<\/span> (cp= <span style=\"color: #008000;\">.0001<\/span> ))\n\n<span style=\"color: #008080;\">#view results<\/span>\nprintcp(tree)\n\nVariables actually used in tree construction:\n[1] HmRun Years\n\nRoot node error: 53319113\/263 = 202734\n\nn=263 (59 observations deleted due to missingness)\n\n           CP nsplit rel error xerror xstd\n1 0.24674996 0 1.00000 1.00756 0.13890\n2 0.10806932 1 0.75325 0.76438 0.12828\n3 0.01865610 2 0.64518 0.70295 0.12769\n4 0.01761100 3 0.62652 0.70339 0.12337\n5 0.01747617 4 0.60891 0.70339 0.12337\n6 0.01038188 5 0.59144 0.66629 0.11817\n7 0.01038065 6 0.58106 0.65697 0.11687\n8 0.00731045 8 0.56029 0.67177 0.11913\n9 0.00714883 9 0.55298 0.67881 0.11960\n10 0.00708618 10 0.54583 0.68034 0.11988\n11 0.00516285 12 0.53166 0.68427 0.11997\n12 0.00445345 13 0.52650 0.68994 0.11996\n13 0.00406069 14 0.52205 0.68988 0.11940\n14 0.00264728 15 0.51799 0.68874 0.11916\n15 0.00196586 16 0.51534 0.68638 0.12043\n16 0.00016686 17 0.51337 0.67577 0.11635\n17 0.00010000 18 0.51321 0.67576 0.11615\nn=263 (59 observations deleted due to missingness)\n<\/span><\/span><\/strong><\/pre>\n<p><span style=\"color: #000000;\"><strong>\u30b9\u30c6\u30c3\u30d7 3: \u6728\u3092\u526a\u5b9a\u3057\u307e\u3059\u3002<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">\u6b21\u306b\u3001\u56de\u5e30\u30c4\u30ea\u30fc\u3092\u679d\u5208\u308a\u3057\u3066\u3001\u30c6\u30b9\u30c8\u8aa4\u5dee\u3092\u6700\u5c0f\u306b\u3059\u308b cp (\u8907\u96d1\u3055\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc) \u306b\u4f7f\u7528\u3059\u308b\u6700\u9069\u306a\u5024\u3092\u898b\u3064\u3051\u307e\u3059\u3002<\/span><\/p>\n<p> <span style=\"color: #000000;\">cp \u306e\u6700\u9069\u5024\u306f\u3001\u524d\u306e\u51fa\u529b\u3067\u6700\u5c0f\u306e<strong>x \u8aa4\u5dee<\/strong>\u3092\u3082\u305f\u3089\u3059\u5024\u3067\u3042\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306f\u3001\u76f8\u4e92\u691c\u8a3c\u30c7\u30fc\u30bf\u304b\u3089\u306e\u89b3\u6e2c\u5024\u306e\u8aa4\u5dee\u3092\u8868\u3057\u307e\u3059\u3002<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #993300;\"><span style=\"color: #008080;\">#identify best cp value to use\n<span style=\"color: #000000;\">best &lt;- tree$cptable[which. <span style=\"color: #3366ff;\">min<\/span> (tree$cptable[,\" <span style=\"color: #008000;\">xerror<\/span> \"]),\" <span style=\"color: #008000;\">CP<\/span> \"]\n\n<span style=\"color: #008080;\">#produce a pruned tree based on the best cp value\n<\/span>pruned_tree &lt;- <span style=\"color: #3366ff;\">prune<\/span> (tree, cp=best)\n\n<span style=\"color: #008080;\">#plot the pruned tree\n<\/span>prp(pruned_tree,\n    faclen= <span style=\"color: #008000;\">0<\/span> , <span style=\"color: #008080;\">#use full names for factor labels<\/span>\n    extra= <span style=\"color: #008000;\">1<\/span> , <span style=\"color: #008080;\">#display number of obs. for each terminal node<\/span>\n    roundint= <span style=\"color: #008000;\">F<\/span> , <span style=\"color: #008080;\">#don't round to integers in output<\/span>\n    digits= <span style=\"color: #008000;\">5<\/span> ) <span style=\"color: #008080;\">#display 5 decimal places in output\n<\/span><\/span><\/span><\/span><\/strong><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-12094 \" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/arbre3.png\" alt=\"R \u306e\u56de\u5e30\u6728\" width=\"425\" height=\"326\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p><span style=\"color: #000000;\">\u6700\u7d42\u7684\u306b\u679d\u5208\u308a\u3055\u308c\u305f\u30c4\u30ea\u30fc\u306b\u306f 6 \u3064\u306e\u7d42\u7aef\u30ce\u30fc\u30c9\u304c\u3042\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002\u5404\u30ea\u30fc\u30d5 \u30ce\u30fc\u30c9\u306b\u306f\u3001\u305d\u306e\u30ce\u30fc\u30c9\u5185\u306e\u9078\u624b\u306e\u4e88\u6e2c\u5e74\u4ff8\u3068\u3001\u305d\u306e\u30b0\u30ec\u30fc\u30c9\u306b\u5c5e\u3059\u308b\u5143\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u304b\u3089\u306e\u89b3\u6e2c\u5024\u306e\u6570\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u305f\u3068\u3048\u3070\u3001\u5143\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u306f\u3001\u7d4c\u9a13\u304c 4.5 \u5e74\u672a\u6e80\u306e\u30d7\u30ec\u30fc\u30e4\u30fc\u304c 90 \u4eba\u3044\u3066\u3001\u5e73\u5747\u7d66\u4e0e\u304c 225.83,000 \u30c9\u30eb\u3067\u3042\u3063\u305f\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002<\/span> <\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-12095 \" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/arbre4.png\" alt=\"R \u3067\u306e\u56de\u5e30\u6728\u306e\u89e3\u91c8\" width=\"403\" height=\"302\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p><span style=\"color: #000000;\"><strong>\u30b9\u30c6\u30c3\u30d7 4: \u30c4\u30ea\u30fc\u3092\u4f7f\u7528\u3057\u3066\u4e88\u6e2c\u3092\u884c\u3044\u307e\u3059\u3002<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">\u6700\u7d42\u7684\u306b\u526a\u5b9a\u3055\u308c\u305f\u6728\u3092\u4f7f\u7528\u3057\u3066\u3001\u7279\u5b9a\u306e\u9078\u624b\u306e\u5e74\u4ff8\u3068\u5e73\u5747\u30db\u30fc\u30e0\u30e9\u30f3\u306b\u57fa\u3065\u3044\u3066\u305d\u306e\u9078\u624b\u306e\u5e74\u4ff8\u3092\u4e88\u6e2c\u3067\u304d\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u305f\u3068\u3048\u3070\u30017 \u5e74\u306e\u7d4c\u9a13\u3068\u5e73\u5747 4 \u672c\u5841\u6253\u306e\u30d7\u30ec\u30fc\u30e4\u30fc\u306e\u671f\u5f85\u5e74\u4ff8\u306f<strong>502.81,000 \u30c9\u30eb<\/strong>\u3067\u3059\u3002<\/span> <\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-12096 \" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/arbre5.png\" alt=\"R \u306e\u56de\u5e30\u6728\u306e\u4f8b\" width=\"422\" height=\"306\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">R \u306e<strong>detect()<\/strong>\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u3053\u308c\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #993300;\"><span style=\"color: #008080;\">#define new player\n<span style=\"color: #000000;\">new &lt;- data.frame(Years=7, HmRun=4)\n\n<\/span>#use pruned tree to predict salary of this player\n<span style=\"color: #000000;\">predict(pruned_tree, newdata=new)\n\n502.8079<\/span><\/span><\/span><\/strong><\/pre>\n<h3><span style=\"color: #000000;\"><strong>\u4f8b 2: R \u3067\u5206\u985e\u30c4\u30ea\u30fc\u3092\u69cb\u7bc9\u3059\u308b<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u3053\u306e\u4f8b\u3067\u306f\u3001 <strong>rpart.plot<\/strong>\u30d1\u30c3\u30b1\u30fc\u30b8\u306e<strong>ptitanic<\/strong>\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u306f\u3001\u30bf\u30a4\u30bf\u30cb\u30c3\u30af\u53f7\u306e\u4e57\u5ba2\u306b\u95a2\u3059\u308b\u3055\u307e\u3056\u307e\u306a\u60c5\u5831\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u3053\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3001\u4e88\u6e2c\u5b50\u5909\u6570<em>class<\/em> \u3001<em>\u6027\u5225<\/em>\u3001\u304a\u3088\u3073<em>\u5e74\u9f62<\/em>\u3092\u4f7f\u7528\u3057\u3066\u7279\u5b9a\u306e\u4e57\u5ba2\u304c\u751f\u5b58\u3057\u305f\u304b\u3069\u3046\u304b\u3092\u4e88\u6e2c\u3059\u308b\u5206\u985e\u30c4\u30ea\u30fc\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u3053\u306e\u5206\u985e\u30c4\u30ea\u30fc\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f\u3001\u6b21\u306e\u624b\u9806\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u30b9\u30c6\u30c3\u30d7 1: \u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">\u307e\u305a\u3001\u3053\u306e\u4f8b\u306b\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #993300;\">library<\/span> (rpart) <span style=\"color: #008080;\">#for fitting decision trees<\/span>\n<span style=\"color: #993300;\">library<\/span> (rpart.plot) <span style=\"color: #008080;\">#for plotting decision trees\n<\/span><\/strong><\/pre>\n<p><span style=\"color: #000000;\"><strong>\u30b9\u30c6\u30c3\u30d7 2: \u521d\u671f\u5206\u985e\u30c4\u30ea\u30fc\u3092\u69cb\u7bc9\u3057\u307e\u3059\u3002<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">\u307e\u305a\u3001\u5927\u898f\u6a21\u306a\u521d\u671f\u5206\u985e\u30c4\u30ea\u30fc\u3092\u69cb\u7bc9\u3057\u307e\u3059\u3002 \u300c\u8907\u96d1\u3055\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u300d\u3092\u8868\u3059<strong>cp<\/strong>\u306b\u5c0f\u3055\u306a\u5024\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u30c4\u30ea\u30fc\u304c\u5927\u304d\u3044\u3053\u3068\u3092\u4fdd\u8a3c\u3067\u304d\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u3053\u308c\u306f\u3001\u30e2\u30c7\u30eb\u5168\u4f53\u306e\u9069\u5408\u5ea6\u304c\u5c11\u306a\u304f\u3068\u3082 cp \u3067\u6307\u5b9a\u3055\u308c\u305f\u5024\u3060\u3051\u5897\u52a0\u3059\u308b\u9650\u308a\u3001\u5206\u985e\u30c4\u30ea\u30fc\u3067\u3055\u3089\u306b\u5206\u5272\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u6b21\u306b\u3001 <strong>printcp()<\/strong>\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u30e2\u30c7\u30eb\u306e\u7d50\u679c\u3092\u51fa\u529b\u3057\u307e\u3059\u3002<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #993300;\"><span style=\"color: #008080;\">#build the initial tree\n<\/span><span style=\"color: #000000;\">tree &lt;- rpart(survived~pclass+sex+age, data=ptitanic, control=rpart. <span style=\"color: #3366ff;\">control<\/span> (cp= <span style=\"color: #008000;\">.0001<\/span> ))\n\n<span style=\"color: #008080;\">#view results<\/span>\nprintcp(tree)\n\nVariables actually used in tree construction:\n[1] age pclass sex   \n\nRoot node error: 500\/1309 = 0.38197\n\nn=1309 \n\n      CP nsplit rel error xerror xstd\n1 0.4240 0 1.000 1.000 0.035158\n2 0.0140 1 0.576 0.576 0.029976\n3 0.0095 3 0.548 0.578 0.030013\n4 0.0070 7 0.510 0.552 0.029517\n5 0.0050 9 0.496 0.528 0.029035\n6 0.0025 11 0.486 0.532 0.029117\n7 0.0020 19 0.464 0.536 0.029198\n8 0.0001 22 0.458 0.528 0.029035\n<\/span><\/span><\/strong><\/pre>\n<p><span style=\"color: #000000;\"><strong>\u30b9\u30c6\u30c3\u30d7 3: \u6728\u3092\u526a\u5b9a\u3057\u307e\u3059\u3002<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">\u6b21\u306b\u3001\u56de\u5e30\u30c4\u30ea\u30fc\u3092\u679d\u5208\u308a\u3057\u3066\u3001\u30c6\u30b9\u30c8\u8aa4\u5dee\u3092\u6700\u5c0f\u306b\u3059\u308b cp (\u8907\u96d1\u3055\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc) \u306b\u4f7f\u7528\u3059\u308b\u6700\u9069\u306a\u5024\u3092\u898b\u3064\u3051\u307e\u3059\u3002<\/span><\/p>\n<p> <span style=\"color: #000000;\">cp \u306e\u6700\u9069\u5024\u306f\u3001\u524d\u306e\u51fa\u529b\u3067\u6700\u5c0f\u306e<strong>x \u8aa4\u5dee<\/strong>\u3092\u3082\u305f\u3089\u3059\u5024\u3067\u3042\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306f\u3001\u76f8\u4e92\u691c\u8a3c\u30c7\u30fc\u30bf\u304b\u3089\u306e\u89b3\u6e2c\u5024\u306e\u8aa4\u5dee\u3092\u8868\u3057\u307e\u3059\u3002<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #993300;\"><span style=\"color: #008080;\">#identify best cp value to use\n<span style=\"color: #000000;\">best &lt;- tree$cptable[which. <span style=\"color: #3366ff;\">min<\/span> (tree$cptable[,\" <span style=\"color: #008000;\">xerror<\/span> \"]),\" <span style=\"color: #008000;\">CP<\/span> \"]\n\n<span style=\"color: #008080;\">#produce a pruned tree based on the best cp value\n<\/span>pruned_tree &lt;- <span style=\"color: #3366ff;\">prune<\/span> (tree, cp=best)\n\n<span style=\"color: #008080;\">#plot the pruned tree\n<\/span>prp(pruned_tree,\n    faclen= <span style=\"color: #008000;\">0<\/span> , #use full names for factor labels\n    extra= <span style=\"color: #008000;\">1<\/span> , #display number of obs. for each terminal node\n    roundint= <span style=\"color: #008000;\">F<\/span> , #don't round to integers in output\n    digits= <span style=\"color: #008000;\">5<\/span> ) #display 5 decimal places in output\n<\/span><\/span><\/span><\/strong><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-12098 \" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/arbre6.png\" alt=\"R \u3067\u306e\u30c4\u30ea\u30fc\u5206\u985e\" width=\"415\" height=\"422\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p><span style=\"color: #000000;\">\u6700\u7d42\u7684\u306b\u679d\u5208\u308a\u3055\u308c\u305f\u30c4\u30ea\u30fc\u306b\u306f 10 \u500b\u306e\u7d42\u7aef\u30ce\u30fc\u30c9\u304c\u3042\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002\u5404\u30bf\u30fc\u30df\u30ca\u30eb \u30ce\u30fc\u30c9\u306f\u3001\u6b7b\u4ea1\u3057\u305f\u4e57\u5ba2\u306e\u6570\u3068\u751f\u5b58\u8005\u306e\u6570\u3092\u793a\u3057\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u305f\u3068\u3048\u3070\u3001\u4e00\u756a\u5de6\u306e\u30ce\u30fc\u30c9\u3067\u306f\u3001664 \u4eba\u306e\u4e57\u5ba2\u304c\u6b7b\u4ea1\u3057\u3001136 \u4eba\u304c\u751f\u304d\u6b8b\u3063\u305f\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002<\/span> <\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-12099 \" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/arbre7.png\" alt=\"R \u3067\u306e\u5206\u985e\u30c4\u30ea\u30fc\u306e\u89e3\u91c8\" width=\"462\" height=\"463\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p><span style=\"color: #000000;\"><strong>\u30b9\u30c6\u30c3\u30d7 4: \u30c4\u30ea\u30fc\u3092\u4f7f\u7528\u3057\u3066\u4e88\u6e2c\u3092\u884c\u3044\u307e\u3059\u3002<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">\u6700\u7d42\u7684\u306b\u526a\u5b9a\u3055\u308c\u305f\u6728\u3092\u4f7f\u7528\u3057\u3066\u3001\u30af\u30e9\u30b9\u3001\u5e74\u9f62\u3001\u6027\u5225\u306b\u57fa\u3065\u3044\u3066\u7279\u5b9a\u306e\u4e57\u5ba2\u304c\u751f\u304d\u6b8b\u308b\u78ba\u7387\u3092\u4e88\u6e2c\u3067\u304d\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u305f\u3068\u3048\u3070\u30011 \u30af\u30e9\u30b9\u306e 8 \u6b73\u306e\u7537\u6027\u4e57\u5ba2\u306e\u751f\u5b58\u78ba\u7387\u306f 11\/29 = 37.9% \u3067\u3059\u3002<\/span> <\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-12100 \" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/arbre8.png\" alt=\"R \u3067\u306e\u30c4\u30ea\u30fc\u5206\u985e\" width=\"402\" height=\"417\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p><span style=\"color: #000000;\">\u3053\u308c\u3089\u306e\u4f8b\u3067\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u5b8c\u5168\u306a R \u30b3\u30fc\u30c9\u306f<a href=\"https:\/\/github.com\/Statorials\/R-Guides\/blob\/main\/CART_models.R\" target=\"_blank\" rel=\"noopener noreferrer\">\u3001\u3053\u3053\u3067<\/a>\u898b\u3064\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u9023\u306e\u4e88\u6e2c\u5909\u6570\u3068\u5fdc\u7b54\u5909\u6570\u306e\u9593\u306e\u95a2\u4fc2\u304c\u7dda\u5f62\u306e\u5834\u5408\u3001\u91cd\u7dda\u5f62\u56de\u5e30\u306a\u3069\u306e\u65b9\u6cd5\u3067\u6b63\u78ba\u306a\u4e88\u6e2c\u30e2\u30c7\u30eb\u3092\u751f\u6210\u3067\u304d\u307e\u3059\u3002 \u305f\u3060\u3057\u3001\u4e00\u9023\u306e\u4e88\u6e2c\u5909\u6570\u3068\u5fdc\u7b54\u306e\u9593\u306e\u95a2\u4fc2\u304c\u3088\u308a\u8907\u96d1\u306a\u5834\u5408\u3001\u591a\u304f\u306e\u5834\u5408\u3001\u975e\u7dda\u5f62\u624b\u6cd5\u306e\u65b9\u304c\u3088\u308a\u6b63\u78ba\u306a\u30e2\u30c7\u30eb\u3092\u751f\u6210\u3067\u304d\u307e\u3059\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-1218","post","type-post","status-publish","format-standard","hentry","category-16"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>R \u3067\u5206\u985e\u6728\u3068\u56de\u5e30\u6728\u3092\u5f53\u3066\u306f\u3081\u308b\u65b9\u6cd5<\/title>\n<meta name=\"description\" content=\"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7\u306e\u4f8b\u3092\u4f7f\u7528\u3057\u3066\u3001R \u3067\u5206\u985e\u6728\u3068\u56de\u5e30\u6728\u3092\u9069\u5408\u3055\u305b\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/statorials.org\/ja\/r-\u306e\u5206\u985e\u6728\u3068\u56de\u5e30\u6728\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"R \u3067\u5206\u985e\u6728\u3068\u56de\u5e30\u6728\u3092\u5f53\u3066\u306f\u3081\u308b\u65b9\u6cd5\" \/>\n<meta property=\"og:description\" content=\"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7\u306e\u4f8b\u3092\u4f7f\u7528\u3057\u3066\u3001R \u3067\u5206\u985e\u6728\u3068\u56de\u5e30\u6728\u3092\u9069\u5408\u3055\u305b\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/ja\/r-\u306e\u5206\u985e\u6728\u3068\u56de\u5e30\u6728\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-27T06:02:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/arbre3.png\" \/>\n<meta name=\"author\" content=\"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"2\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/ja\/r-%e3%81%ae%e5%88%86%e9%a1%9e%e6%9c%a8%e3%81%a8%e5%9b%9e%e5%b8%b0%e6%9c%a8\/\",\"url\":\"https:\/\/statorials.org\/ja\/r-%e3%81%ae%e5%88%86%e9%a1%9e%e6%9c%a8%e3%81%a8%e5%9b%9e%e5%b8%b0%e6%9c%a8\/\",\"name\":\"R \u3067\u5206\u985e\u6728\u3068\u56de\u5e30\u6728\u3092\u5f53\u3066\u306f\u3081\u308b\u65b9\u6cd5\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/ja\/#website\"},\"datePublished\":\"2023-07-27T06:02:37+00:00\",\"dateModified\":\"2023-07-27T06:02:37+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/ja\/#\/schema\/person\/86b92d2dd87368b26360d19d9c6a5d83\"},\"description\":\"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7\u306e\u4f8b\u3092\u4f7f\u7528\u3057\u3066\u3001R \u3067\u5206\u985e\u6728\u3068\u56de\u5e30\u6728\u3092\u9069\u5408\u3055\u305b\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/ja\/r-%e3%81%ae%e5%88%86%e9%a1%9e%e6%9c%a8%e3%81%a8%e5%9b%9e%e5%b8%b0%e6%9c%a8\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/ja\/r-%e3%81%ae%e5%88%86%e9%a1%9e%e6%9c%a8%e3%81%a8%e5%9b%9e%e5%b8%b0%e6%9c%a8\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/ja\/r-%e3%81%ae%e5%88%86%e9%a1%9e%e6%9c%a8%e3%81%a8%e5%9b%9e%e5%b8%b0%e6%9c%a8\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u5bb6\",\"item\":\"https:\/\/statorials.org\/ja\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"R \u3067\u5206\u985e\u6728\u3068\u56de\u5e30\u6728\u3092\u5f53\u3066\u306f\u3081\u308b\u65b9\u6cd5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/ja\/#website\",\"url\":\"https:\/\/statorials.org\/ja\/\",\"name\":\"Statorials\",\"description\":\"\u7d71\u8a08\u80fd\u529b\u3078\u306e\u30ac\u30a4\u30c9\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/ja\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/ja\/#\/schema\/person\/86b92d2dd87368b26360d19d9c6a5d83\",\"name\":\"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/statorials.org\/ja\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/statorials.org\/ja\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"http:\/\/statorials.org\/ja\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"caption\":\"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb\"},\"description\":\"\u79c1\u306f\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u3067\u3059\u3002\u9000\u8077\u3057\u305f\u7d71\u8a08\u6559\u6388\u304b\u3089\u3001\u5c02\u4efb\u306e Statorials \u6559\u80b2\u8005\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u7d71\u8a08\u5206\u91ce\u306b\u304a\u3051\u308b\u8c4a\u5bcc\u306a\u7d4c\u9a13\u3068\u5c02\u9580\u77e5\u8b58\u3092\u6d3b\u304b\u3057\u3066\u3001\u79c1\u306f Statorials \u3092\u901a\u3058\u3066\u5b66\u751f\u306b\u529b\u3092\u4e0e\u3048\u308b\u305f\u3081\u306b\u81ea\u5206\u306e\u77e5\u8b58\u3092\u5171\u6709\u3059\u308b\u3053\u3068\u306b\u5c3d\u529b\u3057\u3066\u3044\u307e\u3059\u3002\u3082\u3063\u3068\u77e5\u308b\",\"sameAs\":[\"http:\/\/statorials.org\/ja\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"R \u3067\u5206\u985e\u6728\u3068\u56de\u5e30\u6728\u3092\u5f53\u3066\u306f\u3081\u308b\u65b9\u6cd5","description":"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7\u306e\u4f8b\u3092\u4f7f\u7528\u3057\u3066\u3001R \u3067\u5206\u985e\u6728\u3068\u56de\u5e30\u6728\u3092\u9069\u5408\u3055\u305b\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/statorials.org\/ja\/r-\u306e\u5206\u985e\u6728\u3068\u56de\u5e30\u6728\/","og_locale":"ja_JP","og_type":"article","og_title":"R \u3067\u5206\u985e\u6728\u3068\u56de\u5e30\u6728\u3092\u5f53\u3066\u306f\u3081\u308b\u65b9\u6cd5","og_description":"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7\u306e\u4f8b\u3092\u4f7f\u7528\u3057\u3066\u3001R \u3067\u5206\u985e\u6728\u3068\u56de\u5e30\u6728\u3092\u9069\u5408\u3055\u305b\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002","og_url":"https:\/\/statorials.org\/ja\/r-\u306e\u5206\u985e\u6728\u3068\u56de\u5e30\u6728\/","og_site_name":"Statorials","article_published_time":"2023-07-27T06:02:37+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/arbre3.png"}],"author":"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"2\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/ja\/r-%e3%81%ae%e5%88%86%e9%a1%9e%e6%9c%a8%e3%81%a8%e5%9b%9e%e5%b8%b0%e6%9c%a8\/","url":"https:\/\/statorials.org\/ja\/r-%e3%81%ae%e5%88%86%e9%a1%9e%e6%9c%a8%e3%81%a8%e5%9b%9e%e5%b8%b0%e6%9c%a8\/","name":"R \u3067\u5206\u985e\u6728\u3068\u56de\u5e30\u6728\u3092\u5f53\u3066\u306f\u3081\u308b\u65b9\u6cd5","isPartOf":{"@id":"https:\/\/statorials.org\/ja\/#website"},"datePublished":"2023-07-27T06:02:37+00:00","dateModified":"2023-07-27T06:02:37+00:00","author":{"@id":"https:\/\/statorials.org\/ja\/#\/schema\/person\/86b92d2dd87368b26360d19d9c6a5d83"},"description":"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7\u306e\u4f8b\u3092\u4f7f\u7528\u3057\u3066\u3001R \u3067\u5206\u985e\u6728\u3068\u56de\u5e30\u6728\u3092\u9069\u5408\u3055\u305b\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/statorials.org\/ja\/r-%e3%81%ae%e5%88%86%e9%a1%9e%e6%9c%a8%e3%81%a8%e5%9b%9e%e5%b8%b0%e6%9c%a8\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/ja\/r-%e3%81%ae%e5%88%86%e9%a1%9e%e6%9c%a8%e3%81%a8%e5%9b%9e%e5%b8%b0%e6%9c%a8\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/ja\/r-%e3%81%ae%e5%88%86%e9%a1%9e%e6%9c%a8%e3%81%a8%e5%9b%9e%e5%b8%b0%e6%9c%a8\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u5bb6","item":"https:\/\/statorials.org\/ja\/"},{"@type":"ListItem","position":2,"name":"R \u3067\u5206\u985e\u6728\u3068\u56de\u5e30\u6728\u3092\u5f53\u3066\u306f\u3081\u308b\u65b9\u6cd5"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/ja\/#website","url":"https:\/\/statorials.org\/ja\/","name":"Statorials","description":"\u7d71\u8a08\u80fd\u529b\u3078\u306e\u30ac\u30a4\u30c9","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/ja\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/statorials.org\/ja\/#\/schema\/person\/86b92d2dd87368b26360d19d9c6a5d83","name":"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/statorials.org\/ja\/#\/schema\/person\/image\/","url":"http:\/\/statorials.org\/ja\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","contentUrl":"http:\/\/statorials.org\/ja\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","caption":"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb"},"description":"\u79c1\u306f\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u3067\u3059\u3002\u9000\u8077\u3057\u305f\u7d71\u8a08\u6559\u6388\u304b\u3089\u3001\u5c02\u4efb\u306e Statorials \u6559\u80b2\u8005\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u7d71\u8a08\u5206\u91ce\u306b\u304a\u3051\u308b\u8c4a\u5bcc\u306a\u7d4c\u9a13\u3068\u5c02\u9580\u77e5\u8b58\u3092\u6d3b\u304b\u3057\u3066\u3001\u79c1\u306f Statorials \u3092\u901a\u3058\u3066\u5b66\u751f\u306b\u529b\u3092\u4e0e\u3048\u308b\u305f\u3081\u306b\u81ea\u5206\u306e\u77e5\u8b58\u3092\u5171\u6709\u3059\u308b\u3053\u3068\u306b\u5c3d\u529b\u3057\u3066\u3044\u307e\u3059\u3002\u3082\u3063\u3068\u77e5\u308b","sameAs":["http:\/\/statorials.org\/ja"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/posts\/1218","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/comments?post=1218"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/posts\/1218\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/media?parent=1218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/categories?post=1218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/tags?post=1218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}