{"id":4499,"date":"2023-07-10T14:21:52","date_gmt":"2023-07-10T14:21:52","guid":{"rendered":"https:\/\/statorials.org\/ja\/r%e3%83%a9%e3%83%b3%e3%82%af%e7%b8%9b%e3%82%8a%e6%b3%95\/"},"modified":"2023-07-10T14:21:52","modified_gmt":"2023-07-10T14:21:52","slug":"r%e3%83%a9%e3%83%b3%e3%82%af%e7%b8%9b%e3%82%8a%e6%b3%95","status":"publish","type":"post","link":"https:\/\/statorials.org\/ja\/r%e3%83%a9%e3%83%b3%e3%82%af%e7%b8%9b%e3%82%8a%e6%b3%95\/","title":{"rendered":"A: \u30e9\u30f3\u30ad\u30f3\u30b0\u95a2\u6570\u306etie.method\u306e\u5b8c\u5168\u30ac\u30a4\u30c9"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">\u30d9\u30fc\u30b9 R \u3067<strong>Rank()<\/strong>\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u3001\u30d9\u30af\u30c8\u30eb\u5185\u306e\u5024\u306e\u30e9\u30f3\u30af\u3092\u8fd4\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u3053\u306e\u95a2\u6570\u306f\u6b21\u306e\u57fa\u672c\u69cb\u6587\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u30e9\u30f3\u30af(x, na.last=TRUE,ties.method=\u201d\u5e73\u5747\u201d)<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">\u91d1\uff1a<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><strong>x<\/strong> : \u5206\u985e\u3059\u308b\u5024\u3092\u542b\u3080\u30d9\u30af\u30c8\u30eb<\/span><\/li>\n<li><span style=\"color: #000000;\"><strong>na.last<\/strong> : TRUE \u306e\u5834\u5408\u3001\u6b20\u640d\u5024\u306f\u6700\u5f8c\u306b\u914d\u7f6e\u3055\u308c\u307e\u3059\u3002 FALSE \u306e\u5834\u5408\u3001\u6b20\u640d\u5024\u304c\u6700\u521d\u306b\u914d\u7f6e\u3055\u308c\u307e\u3059\u3002<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>tie.method<\/strong> : \u30bf\u30a4\u306e\u51e6\u7406\u65b9\u6cd5 (\u30c7\u30d5\u30a9\u30eb\u30c8\u306f\u300c\u5e73\u5747\u300d)<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\"><strong>Rank()<\/strong>\u95a2\u6570\u306e<strong>Ties.method<\/strong>\u5f15\u6570\u306f\u3001\u30bf\u30a4\u306e\u51e6\u7406\u65b9\u6cd5\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u3053\u306e\u5f15\u6570\u306f\u6b21\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u53d7\u3051\u5165\u308c\u307e\u3059\u3002<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><strong>Average<\/strong> : (\u30c7\u30d5\u30a9\u30eb\u30c8) \u30ea\u30f3\u30af\u3055\u308c\u305f\u5404\u9805\u76ee\u306b\u5e73\u5747\u30e9\u30f3\u30af\u3092\u5272\u308a\u5f53\u3066\u307e\u3059 (3 \u756a\u76ee\u3068 4 \u756a\u76ee\u306b\u30e9\u30f3\u30af\u3055\u308c\u305f\u9805\u76ee\u306b\u306f\u4e21\u65b9\u3068\u3082 3.5 \u306e\u30e9\u30f3\u30af\u304c\u4e0e\u3048\u3089\u308c\u307e\u3059)\u3002<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>first<\/strong> : \u6700\u521d\u306b\u30ea\u30f3\u30af\u3055\u308c\u305f\u8981\u7d20\u3092\u6700\u3082\u4f4e\u3044\u30e9\u30f3\u30af\u306b\u5272\u308a\u5f53\u3066\u307e\u3059 (3 \u756a\u76ee\u3068 4 \u756a\u76ee\u306b\u30e9\u30f3\u30af\u3055\u308c\u305f\u8981\u7d20\u306b\u306f\u305d\u308c\u305e\u308c\u30e9\u30f3\u30af 3 \u3068 4 \u304c\u4e0e\u3048\u3089\u308c\u307e\u3059)<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>last<\/strong> : \u6700\u5f8c\u306b\u30ea\u30f3\u30af\u3055\u308c\u305f\u8981\u7d20\u3092\u6700\u3082\u4f4e\u3044\u30e9\u30f3\u30af\u306b\u5272\u308a\u5f53\u3066\u307e\u3059 (3 \u756a\u76ee\u3068 4 \u756a\u76ee\u306b\u30e9\u30f3\u30af\u3055\u308c\u305f\u8981\u7d20\u306f\u305d\u308c\u305e\u308c 4 \u3068 3 \u306e\u30e9\u30f3\u30af\u3092\u53d7\u3051\u53d6\u308a\u307e\u3059)<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>min<\/strong> : \u30ea\u30f3\u30af\u3055\u308c\u305f\u5404\u9805\u76ee\u3092\u6700\u3082\u4f4e\u3044\u30e9\u30f3\u30af\u306b\u5272\u308a\u5f53\u3066\u307e\u3059 (3 \u756a\u76ee\u3068 4 \u756a\u76ee\u306b\u30e9\u30f3\u30af\u3055\u308c\u305f\u9805\u76ee\u306f\u4e21\u65b9\u3068\u3082 3 \u306e\u30e9\u30f3\u30af\u3092\u53d7\u3051\u53d6\u308a\u307e\u3059)\u3002<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>max<\/strong> : \u30ea\u30f3\u30af\u3055\u308c\u305f\u5404\u9805\u76ee\u306b\u6700\u9ad8\u306e\u30e9\u30f3\u30af\u3092\u5272\u308a\u5f53\u3066\u307e\u3059 (3 \u756a\u76ee\u3068 4 \u756a\u76ee\u306b\u30e9\u30f3\u30af\u3055\u308c\u305f\u9805\u76ee\u306f\u4e21\u65b9\u3068\u3082 4 \u306e\u30e9\u30f3\u30af\u3092\u53d7\u3051\u53d6\u308a\u307e\u3059)<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>random<\/strong> : \u540c\u9806\u4f4d\u306e\u5404\u8981\u7d20\u306b\u30e9\u30f3\u30c0\u30e0\u306a\u30e9\u30f3\u30af\u3092\u5272\u308a\u5f53\u3066\u307e\u3059 (3 \u4f4d\u3068 4 \u4f4d\u306b\u540c\u9806\u4f4d\u306e\u8981\u7d20\u306e\u3044\u305a\u308c\u304b\u304c\u3044\u305a\u308c\u304b\u306e\u30e9\u30f3\u30af\u3092\u53d7\u3051\u53d6\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059)<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u4f8b\u306f\u3001R \u306e\u6b21\u306e\u30c7\u30fc\u30bf \u30d5\u30ec\u30fc\u30e0\u3067\u5404\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u5b9f\u969b\u306b\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#create data frame\n<\/span>df &lt;- data. <span style=\"color: #3366ff;\">frame<\/span> (player=c('A', 'B', 'C', 'D', 'E'),\n                 dots=c(5, 8, 10, 10, 17))\n\n<span style=\"color: #008080;\">#view data frame\n<\/span>df\n\n  player points\n1 to 5\n2 B 8\n3 C 10\n4 D 10\n5 E 17\n<\/strong><\/pre>\n<h2><span style=\"color: #000000;\"><strong>\u4f8b 1: Rank() \u3092 Ties.method=\u201daverage\u201d \u3067\u4f7f\u7528\u3059\u308b<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u3001 <strong>Ties.method=\u201daverage\u201d<\/strong>\u3092\u6307\u5b9a\u3057\u305f<strong>Rank()<\/strong>\u3092\u4f7f\u7528\u3057\u3066\u3001<strong>\u30dd\u30a4\u30f3\u30c8<\/strong>\u5217\u306e\u5024\u306b\u57fa\u3065\u3044\u3066\u5404\u30d7\u30ec\u30fc\u30e4\u30fc\u306b\u30e9\u30f3\u30af\u3092\u5272\u308a\u5f53\u3066\u308b\u65b0\u3057\u3044\u5217\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#create new column that ranks players based on their points value<\/span>\ndf$points_rank = rank(df$points, ties. <span style=\"color: #3366ff;\">method<\/span> = \u201c <span style=\"color: #ff0000;\">average<\/span> \u201d)\n\n<span style=\"color: #008080;\">#view updated data frame<\/span>\ndf\n\n  player points points_rank\n1 to 5 1.0\n2 B 8 2.0\n3 C 10 3.5\n4 D 10 3.5\n5 E 17 5.0\n<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u30d7\u30ec\u30fc\u30e4\u30fc C \u3068 D \u306f\u540c\u3058\u30dd\u30a4\u30f3\u30c8\u6570\u3092\u6301\u3061\u30013 \u4f4d\u3068 4 \u4f4d\u306b\u3044\u305f\u305f\u3081\u3001\u4e21\u8005\u3068\u3082\u30e9\u30f3\u30ad\u30f3\u30b0\u5e73\u5747<strong>3.5<\/strong>\u3092\u7372\u5f97\u3057\u307e\u3057\u305f\u3002<\/span><\/p>\n<h2><span style=\"color: #000000;\"><strong>\u4f8b 2: Ties.method=\u201dfirst\u201d \u3067 Rank() \u3092\u4f7f\u7528\u3059\u308b<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u3001 <strong>Ties.method=\u201dfirst\u201d<\/strong>\u3092\u6307\u5b9a\u3057\u305f<strong>Rank()<\/strong>\u3092\u4f7f\u7528\u3057\u3066\u3001<strong>\u30dd\u30a4\u30f3\u30c8<\/strong>\u5217\u306e\u5024\u306b\u57fa\u3065\u3044\u3066\u5404\u30d7\u30ec\u30fc\u30e4\u30fc\u306b\u30e9\u30f3\u30af\u3092\u5272\u308a\u5f53\u3066\u308b\u65b0\u3057\u3044\u5217\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#create new column that ranks players based on their points value<\/span>\ndf$points_rank = rank(df$points, ties. <span style=\"color: #3366ff;\">method<\/span> = \" <span style=\"color: #ff0000;\">first<\/span> \")\n\n<span style=\"color: #008080;\">#view updated data frame<\/span>\ndf\n\n  player points points_rank\n1 to 5 1\n2 B 8 2\n3 C 10 3\n4 D 10 4\n5 E 17 5\n<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u30d7\u30ec\u30fc\u30e4\u30fc C \u3068 D \u306f\u540c\u3058\u30dd\u30a4\u30f3\u30c8\u6570\u3092\u6301\u3061\u3001\u30dd\u30b8\u30b7\u30e7\u30f3 3 \u3068 4 \u3092\u5360\u3081\u3066\u3044\u305f\u305f\u3081\u3001\u3053\u308c\u3089 2 \u4eba\u306e\u9593\u306e\u6700\u521d\u306e\u30d7\u30ec\u30fc\u30e4\u30fc (\u30d7\u30ec\u30fc\u30e4\u30fc\u300cC\u300d) \u304c\u6700\u3082\u4f4e\u3044\u30e9\u30f3\u30af\u3092\u7372\u5f97\u3057\u307e\u3057\u305f\u3002<\/span><\/p>\n<h2><span style=\"color: #000000;\"><strong>\u4f8b 3: Rank() \u3092 Ties.method=\u201dlast\u201d \u3067\u4f7f\u7528\u3059\u308b<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u3001 <strong>Ties.method=\u201dlast\u201d<\/strong>\u3092\u6307\u5b9a\u3057\u305f<strong>Rank()<\/strong>\u3092\u4f7f\u7528\u3057\u3066\u3001<strong>\u30dd\u30a4\u30f3\u30c8<\/strong>\u5217\u306e\u5024\u306b\u57fa\u3065\u3044\u3066\u5404\u30d7\u30ec\u30fc\u30e4\u30fc\u306b\u30e9\u30f3\u30af\u3092\u5272\u308a\u5f53\u3066\u308b\u65b0\u3057\u3044\u5217\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#create new column that ranks players based on their points value<\/span>\ndf$points_rank = rank(df$points, ties. <span style=\"color: #3366ff;\">method<\/span> = \" <span style=\"color: #ff0000;\">last<\/span> \")\n\n<span style=\"color: #008080;\">#view updated data frame<\/span>\ndf\n\n  player points points_rank\n1 to 5 1\n2 B 8 2\n3 C 10 4\n4 D 10 3\n5 E 17 5\n<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u30d7\u30ec\u30fc\u30e4\u30fc C \u3068 D \u306f\u540c\u3058\u30dd\u30a4\u30f3\u30c8\u6570\u3092\u6301\u3061\u3001\u30dd\u30b8\u30b7\u30e7\u30f3 3 \u3068 4 \u3092\u5360\u3081\u3066\u3044\u305f\u305f\u3081\u3001\u3053\u308c\u3089 2 \u4eba\u306e\u9593\u306e\u6700\u5f8c\u306e\u30d7\u30ec\u30fc\u30e4\u30fc (\u30d7\u30ec\u30fc\u30e4\u30fc\u300cD\u300d) \u304c\u6700\u3082\u4f4e\u3044\u30e9\u30f3\u30af\u3092\u7372\u5f97\u3057\u307e\u3057\u305f\u3002<\/span><\/p>\n<h2><span style=\"color: #000000;\"><strong>\u4f8b 4: Rank() \u3092 Ties.method=\u201dmin\u201d \u3067\u4f7f\u7528\u3059\u308b<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u3001 <strong>Ties.method=\u201dmin\u201d<\/strong>\u3092\u6307\u5b9a\u3057\u305f<strong>Rank()<\/strong>\u3092\u4f7f\u7528\u3057\u3066\u3001<strong>\u30dd\u30a4\u30f3\u30c8<\/strong>\u5217\u306e\u5024\u306b\u57fa\u3065\u3044\u3066\u5404\u30d7\u30ec\u30fc\u30e4\u30fc\u306b\u30e9\u30f3\u30af\u3092\u5272\u308a\u5f53\u3066\u308b\u65b0\u3057\u3044\u5217\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#create new column that ranks players based on their points value<\/span>\ndf$points_rank = rank(df$points, ties. <span style=\"color: #3366ff;\">method<\/span> = \" <span style=\"color: #ff0000;\">min<\/span> \")\n\n<span style=\"color: #008080;\">#view updated data frame<\/span>\ndf\n\n  player points points_rank\n1 to 5 1\n2 B 8 2\n3 C 10 3\n4 D 10 3\n5 E 17 5\n<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u30d7\u30ec\u30fc\u30e4\u30fc C \u3068 D \u306f\u540c\u3058\u30dd\u30a4\u30f3\u30c8\u6570\u3092\u6301\u3061\u3001\u30dd\u30b8\u30b7\u30e7\u30f3 3 \u3068 4 \u306b\u3044\u305f\u305f\u3081\u3001\u4e21\u65b9\u306e\u30d7\u30ec\u30fc\u30e4\u30fc\u306f\u6700\u4f4e\u30e9\u30f3\u30af<strong>3<\/strong>\u3092\u53d7\u3051\u53d6\u308a\u307e\u3057\u305f\u3002<\/span><\/p>\n<h2><span style=\"color: #000000;\"><strong>\u4f8b 5: Ties.method=\u201dmax\u201d \u3067 Rank() \u3092\u4f7f\u7528\u3059\u308b<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u3001 <strong>Ties.method=\u201dmax\u201d<\/strong>\u3092\u6307\u5b9a\u3057\u305f<strong>Rank()<\/strong>\u3092\u4f7f\u7528\u3057\u3066\u3001<strong>\u30dd\u30a4\u30f3\u30c8<\/strong>\u5217\u306e\u5024\u306b\u57fa\u3065\u3044\u3066\u5404\u30d7\u30ec\u30fc\u30e4\u30fc\u306b\u30e9\u30f3\u30af\u3092\u5272\u308a\u5f53\u3066\u308b\u65b0\u3057\u3044\u5217\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#create new column that ranks players based on their points value<\/span>\ndf$points_rank = rank(df$points, ties. <span style=\"color: #3366ff;\">method<\/span> = \" <span style=\"color: #ff0000;\">max<\/span> \")\n\n<span style=\"color: #008080;\">#view updated data frame<\/span>\ndf\n\n  player points points_rank\n1 to 5 1\n2 B 8 2\n3 C 10 4\n4 D 10 4\n5 E 17 5\n<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u30d7\u30ec\u30fc\u30e4\u30fc C \u3068 D \u306f\u540c\u3058\u30dd\u30a4\u30f3\u30c8\u6570\u3092\u6301\u3061\u3001\u30dd\u30b8\u30b7\u30e7\u30f3 3 \u3068 4 \u306b\u3044\u305f\u305f\u3081\u3001\u4e21\u30d7\u30ec\u30fc\u30e4\u30fc\u306f\u6700\u5927\u30e9\u30f3\u30af<strong>4<\/strong>\u3092\u53d7\u3051\u53d6\u308a\u307e\u3057\u305f\u3002<\/span><\/p>\n<h2><span style=\"color: #000000;\"><strong>\u4f8b 6: Rank() \u3092 Ties.method=\u201drandom\u201d \u3067\u4f7f\u7528\u3059\u308b<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u3001 <strong>Ties.method=\u201drandom\u201d<\/strong>\u3092\u6307\u5b9a\u3057\u305f<strong>Rank()<\/strong>\u3092\u4f7f\u7528\u3057\u3066\u3001<strong>\u30dd\u30a4\u30f3\u30c8<\/strong>\u5217\u306e\u5024\u306b\u57fa\u3065\u3044\u3066\u5404\u30d7\u30ec\u30fc\u30e4\u30fc\u306b\u30e9\u30f3\u30af\u3092\u5272\u308a\u5f53\u3066\u308b\u65b0\u3057\u3044\u5217\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#create new column that ranks players based on their points value<\/span>\ndf$points_rank = rank(df$points, ties. <span style=\"color: #3366ff;\">method<\/span> = \" <span style=\"color: #ff0000;\">random<\/span> \")\n\n<span style=\"color: #008080;\">#view updated data frame<\/span>\ndf\n\n  player points points_rank\n1 to 5 1\n2 B 8 2\n3 C 10 4\n4 D 10 3\n5 E 17 5\n<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u30d7\u30ec\u30fc\u30e4\u30fc C \u3068 D \u306f\u540c\u3058\u30dd\u30a4\u30f3\u30c8\u6570\u3092\u6301\u3061\u3001\u30dd\u30b8\u30b7\u30e7\u30f3 3 \u3068 4 \u306b\u3044\u305f\u305f\u3081\u3001\u5404\u30d7\u30ec\u30fc\u30e4\u30fc\u306b\u306f\u30e9\u30f3\u30c0\u30e0\u306b 3 \u307e\u305f\u306f 4 \u306e\u30e9\u30f3\u30af\u304c\u5272\u308a\u5f53\u3066\u3089\u308c\u307e\u3057\u305f\u3002<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>tie.method<\/strong>\u306b\u300crandom\u300d\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u305f\u3073\u306b\u5404\u5024\u306b\u5272\u308a\u5f53\u3066\u3089\u308c\u308b\u30e9\u30f3\u30af\u304c\u5909\u308f\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/span><\/p>\n<h2><span style=\"color: #000000;\"><strong>\u8ffd\u52a0\u30ea\u30bd\u30fc\u30b9<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001R \u3067\u4ed6\u306e\u4e00\u822c\u7684\u306a\u30bf\u30b9\u30af\u3092\u5b9f\u884c\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/span><\/p>\n<p> <span style=\"color: #000000;\"><a href=\"https:\/\/statorials.org\/ja\/\u30bd\u30fc\u30c8\u9806\u5e8f-r-\u306e\u30e9\u30f3\u30af\/\" target=\"_blank\" rel=\"noopener\">R \u3067 sort()\u3001order()\u3001Rank() \u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5<\/a><br \/><a href=\"https:\/\/statorials.org\/ja\/r-\u306e\u30cf\u309a\u30fc\u30bb\u30f3\u30bf\u30a4\u30eb\u9806\u4f4d\/\" target=\"_blank\" rel=\"noopener\">R \u3067\u30d1\u30fc\u30bb\u30f3\u30bf\u30a4\u30eb \u30e9\u30f3\u30af\u3092\u8a08\u7b97\u3059\u308b\u65b9\u6cd5<\/a><br \/><a href=\"https:\/\/statorials.org\/ja\/dplyr-\u306e\u30af\u3099\u30eb\u30fc\u30d5\u309a\u5225\u5206\u985e\/\" target=\"_blank\" rel=\"noopener\">dplyr\u3092\u4f7f\u7528\u3057\u3066\u30b0\u30eb\u30fc\u30d7\u5225\u306b\u4e26\u3079\u66ff\u3048\u308b\u65b9\u6cd5<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30d9\u30fc\u30b9 R \u3067Rank()\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u3001\u30d9\u30af\u30c8\u30eb\u5185\u306e\u5024\u306e\u30e9\u30f3\u30af\u3092\u8fd4\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u3053\u306e\u95a2\u6570\u306f\u6b21\u306e\u57fa\u672c\u69cb\u6587\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 \u30e9\u30f3\u30af(x, na.last=TRUE,ties.method=\u201d\u5e73\u5747\u201d) \u91d1\uff1a x : \u5206\u985e [&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-4499","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>A: Links.Rank \u30e1\u30bd\u30c3\u30c9\u306e\u5b8c\u5168\u30ac\u30a4\u30c9 - \u7d71\u8a08<\/title>\n<meta name=\"description\" content=\"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001R \u306e Rank() \u95a2\u6570\u3067tie.method \u5f15\u6570\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u3092\u3044\u304f\u3064\u304b\u306e\u4f8b\u3068\u3068\u3082\u306b\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\u30e9\u30f3\u30af\u7e1b\u308a\u6cd5\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A: Links.Rank \u30e1\u30bd\u30c3\u30c9\u306e\u5b8c\u5168\u30ac\u30a4\u30c9 - \u7d71\u8a08\" \/>\n<meta property=\"og:description\" content=\"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001R \u306e Rank() \u95a2\u6570\u3067tie.method \u5f15\u6570\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u3092\u3044\u304f\u3064\u304b\u306e\u4f8b\u3068\u3068\u3082\u306b\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/ja\/r\u30e9\u30f3\u30af\u7e1b\u308a\u6cd5\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-10T14:21:52+00:00\" \/>\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%83%a9%e3%83%b3%e3%82%af%e7%b8%9b%e3%82%8a%e6%b3%95\/\",\"url\":\"https:\/\/statorials.org\/ja\/r%e3%83%a9%e3%83%b3%e3%82%af%e7%b8%9b%e3%82%8a%e6%b3%95\/\",\"name\":\"A: Links.Rank \u30e1\u30bd\u30c3\u30c9\u306e\u5b8c\u5168\u30ac\u30a4\u30c9 - \u7d71\u8a08\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/ja\/#website\"},\"datePublished\":\"2023-07-10T14:21:52+00:00\",\"dateModified\":\"2023-07-10T14:21:52+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/ja\/#\/schema\/person\/86b92d2dd87368b26360d19d9c6a5d83\"},\"description\":\"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001R \u306e Rank() \u95a2\u6570\u3067tie.method \u5f15\u6570\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u3092\u3044\u304f\u3064\u304b\u306e\u4f8b\u3068\u3068\u3082\u306b\u8aac\u660e\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/ja\/r%e3%83%a9%e3%83%b3%e3%82%af%e7%b8%9b%e3%82%8a%e6%b3%95\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/ja\/r%e3%83%a9%e3%83%b3%e3%82%af%e7%b8%9b%e3%82%8a%e6%b3%95\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/ja\/r%e3%83%a9%e3%83%b3%e3%82%af%e7%b8%9b%e3%82%8a%e6%b3%95\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u5bb6\",\"item\":\"https:\/\/statorials.org\/ja\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A: \u30e9\u30f3\u30ad\u30f3\u30b0\u95a2\u6570\u306etie.method\u306e\u5b8c\u5168\u30ac\u30a4\u30c9\"}]},{\"@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":"A: Links.Rank \u30e1\u30bd\u30c3\u30c9\u306e\u5b8c\u5168\u30ac\u30a4\u30c9 - \u7d71\u8a08","description":"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001R \u306e Rank() \u95a2\u6570\u3067tie.method \u5f15\u6570\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u3092\u3044\u304f\u3064\u304b\u306e\u4f8b\u3068\u3068\u3082\u306b\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\u30e9\u30f3\u30af\u7e1b\u308a\u6cd5\/","og_locale":"ja_JP","og_type":"article","og_title":"A: Links.Rank \u30e1\u30bd\u30c3\u30c9\u306e\u5b8c\u5168\u30ac\u30a4\u30c9 - \u7d71\u8a08","og_description":"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001R \u306e Rank() \u95a2\u6570\u3067tie.method \u5f15\u6570\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u3092\u3044\u304f\u3064\u304b\u306e\u4f8b\u3068\u3068\u3082\u306b\u8aac\u660e\u3057\u307e\u3059\u3002","og_url":"https:\/\/statorials.org\/ja\/r\u30e9\u30f3\u30af\u7e1b\u308a\u6cd5\/","og_site_name":"Statorials","article_published_time":"2023-07-10T14:21:52+00:00","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%83%a9%e3%83%b3%e3%82%af%e7%b8%9b%e3%82%8a%e6%b3%95\/","url":"https:\/\/statorials.org\/ja\/r%e3%83%a9%e3%83%b3%e3%82%af%e7%b8%9b%e3%82%8a%e6%b3%95\/","name":"A: Links.Rank \u30e1\u30bd\u30c3\u30c9\u306e\u5b8c\u5168\u30ac\u30a4\u30c9 - \u7d71\u8a08","isPartOf":{"@id":"https:\/\/statorials.org\/ja\/#website"},"datePublished":"2023-07-10T14:21:52+00:00","dateModified":"2023-07-10T14:21:52+00:00","author":{"@id":"https:\/\/statorials.org\/ja\/#\/schema\/person\/86b92d2dd87368b26360d19d9c6a5d83"},"description":"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001R \u306e Rank() \u95a2\u6570\u3067tie.method \u5f15\u6570\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u3092\u3044\u304f\u3064\u304b\u306e\u4f8b\u3068\u3068\u3082\u306b\u8aac\u660e\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/statorials.org\/ja\/r%e3%83%a9%e3%83%b3%e3%82%af%e7%b8%9b%e3%82%8a%e6%b3%95\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/ja\/r%e3%83%a9%e3%83%b3%e3%82%af%e7%b8%9b%e3%82%8a%e6%b3%95\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/ja\/r%e3%83%a9%e3%83%b3%e3%82%af%e7%b8%9b%e3%82%8a%e6%b3%95\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u5bb6","item":"https:\/\/statorials.org\/ja\/"},{"@type":"ListItem","position":2,"name":"A: \u30e9\u30f3\u30ad\u30f3\u30b0\u95a2\u6570\u306etie.method\u306e\u5b8c\u5168\u30ac\u30a4\u30c9"}]},{"@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\/4499","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=4499"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/posts\/4499\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/media?parent=4499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/categories?post=4499"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/tags?post=4499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}