{"id":466,"date":"2023-07-29T19:40:31","date_gmt":"2023-07-29T19:40:31","guid":{"rendered":"https:\/\/statorials.org\/ja\/rapply-sapply%e3%81%a8tapply%e3%82%92%e9%81%a9%e7%94%a8%e3%81%99%e3%82%8b%e3%81%9f%e3%82%81%e3%81%ae%e3%82%ab%e3%82%99%e3%82%a4%e3%83%88%e3%82%99\/"},"modified":"2023-07-29T19:40:31","modified_gmt":"2023-07-29T19:40:31","slug":"rapply-sapply%e3%81%a8tapply%e3%82%92%e9%81%a9%e7%94%a8%e3%81%99%e3%82%8b%e3%81%9f%e3%82%81%e3%81%ae%e3%82%ab%e3%82%99%e3%82%a4%e3%83%88%e3%82%99","status":"publish","type":"post","link":"https:\/\/statorials.org\/ja\/rapply-sapply%e3%81%a8tapply%e3%82%92%e9%81%a9%e7%94%a8%e3%81%99%e3%82%8b%e3%81%9f%e3%82%81%e3%81%ae%e3%82%ab%e3%82%99%e3%82%a4%e3%83%88%e3%82%99\/","title":{"rendered":"R \u306e apply()\u3001lapply()\u3001sapply()\u3001tapply() \u306e\u30ac\u30a4\u30c9"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001R \u306e\u7d44\u307f\u8fbc\u307f\u95a2\u6570<strong>apply()<\/strong> \u3001 <strong>sapply()<\/strong> \u3001 <strong>lapply()\u3001<\/strong> <strong>tapply()<\/strong>\u306e\u9055\u3044\u3092\u3001\u5404\u95a2\u6570\u306e\u4f7f\u7528\u6642\u671f\u3068\u4f7f\u7528\u65b9\u6cd5\u306e\u4f8b\u3068\u3068\u3082\u306b\u8aac\u660e\u3057\u307e\u3059\u3002<\/span><\/p>\n<h2><span style=\"color: #000000;\"><strong>\u9069\u7528\u3059\u308b\uff08\uff09<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">\u884c\u5217\u307e\u305f\u306f\u30c7\u30fc\u30bf \u30d5\u30ec\u30fc\u30e0\u306e\u884c\u307e\u305f\u306f\u5217\u306b\u95a2\u6570\u3092\u9069\u7528\u3059\u308b\u5834\u5408\u306f\u3001 <strong>apply()<\/strong>\u95a2\u6570\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/span><\/p>\n<p> <span style=\"color: #000000;\">apply() \u95a2\u6570\u306e\u57fa\u672c\u69cb\u6587\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/span><\/p>\n<p style=\"text-align: center;\"><span style=\"color: #000000;\"><strong>\u9069\u7528 (X\u3001\u30de\u30fc\u30b8\u30f3\u3001FUN)<\/strong><\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">X \u306f\u914d\u5217\u307e\u305f\u306f\u30c7\u30fc\u30bf \u30d6\u30ed\u30c3\u30af\u306e\u540d\u524d\u3067\u3059<\/span><\/li>\n<li><span style=\"color: #000000;\">MARGIN \u306f\u3001\u3069\u306e\u6b21\u5143\u3067\u64cd\u4f5c\u3092\u5b9f\u884c\u3059\u308b\u304b\u3092\u793a\u3057\u307e\u3059 (1 = \u884c\u30012 = \u5217)<\/span><\/li>\n<li> <span style=\"color: #000000;\">FUN \u306f\u3001\u5b9f\u884c\u3057\u305f\u3044\u7279\u5b9a\u306e\u64cd\u4f5c (\u6700\u5c0f\u3001\u6700\u5927\u3001\u5408\u8a08\u3001\u5e73\u5747\u306a\u3069) \u3067\u3059\u3002<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u3001 <strong>apply()<\/strong>\u306e\u52d5\u4f5c\u4f8b\u3092\u3044\u304f\u3064\u304b\u793a\u3057\u307e\u3059\u3002<\/span><\/p>\n<pre style=\"background-color: #e5e5e5; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#create a data frame with three columns and five rows<\/span>\ndata &lt;- data.frame(a = c(1, 3, 7, 12, 9),\n                   b = c(4, 4, 6, 7, 8),\n                   c = c(14, 15, 11, 10, 6))\ndata\n\n#abc\n#1 1 4 14\n#2 3 4 15\n#3 7 6 11\n#4 12 7 10\n#5 9 8 6\n\n<span style=\"color: #008080;\">#find the sum of each row<\/span>\napply(data, 1, sum)\n\n#[1] 19 22 24 29 23\n\n<span style=\"color: #008080;\">#find the sum of each column<\/span>\napply(data, 2, sum)\n\n#abc\n#32 29 56 \n\n<span style=\"color: #008080;\">#find the mean of each row<\/span>\napply(data, 1, mean)\n\n#[1] 6.333333 7.333333 8.000000 9.666667 7.666667\n\n<span style=\"color: #008080;\">#find the mean of each column, rounded to one decimal place<\/span>\nround(apply(data, 2, mean), 1)\n\n#abc\n#6.4 5.8 11.2 \n\n<span style=\"color: #008080;\">#find the standard deviation of each row<\/span>\napply(data, 1, sd)\n\n#[1] 6.806859 6.658328 2.645751 2.516611 1.527525\n\n<span style=\"color: #008080;\">#find the standard deviation of each column<\/span>\napply(data, 2, sd)\n\n#abc\n#4.449719 1.788854 3.563706 \n<\/strong><\/pre>\n<h2><span style=\"color: #000000;\"><strong>\u9069\u7528\u3059\u308b\uff08\uff09<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">\u30ea\u30b9\u30c8\u3001\u30d9\u30af\u30c8\u30eb\u3001\u307e\u305f\u306f\u30c7\u30fc\u30bf \u30d5\u30ec\u30fc\u30e0\u306e\u5404\u8981\u7d20\u306b\u95a2\u6570\u3092\u9069\u7528\u3057\u3001\u7d50\u679c\u3068\u3057\u3066\u30ea\u30b9\u30c8\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u306f\u3001 <strong>lapply()<\/strong>\u95a2\u6570\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/span><\/p>\n<p> <span style=\"color: #000000;\">lagply() \u95a2\u6570\u306e\u57fa\u672c\u69cb\u6587\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/span><\/p>\n<p style=\"text-align: center;\"><span style=\"color: #000000;\"><strong>\u30e9\u30c3\u30d7\u30ea(X\u3001FUN)<\/strong><\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">X \u306f\u30ea\u30b9\u30c8\u3001\u30d9\u30af\u30c8\u30eb\u3001\u307e\u305f\u306f\u30c7\u30fc\u30bf \u30d5\u30ec\u30fc\u30e0\u306e\u540d\u524d\u3067\u3059\u3002<\/span><\/li>\n<li> <span style=\"color: #000000;\">FUN \u306f\u5b9f\u884c\u3057\u305f\u3044\u7279\u5b9a\u306e\u64cd\u4f5c\u3067\u3059<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u3001\u30c7\u30fc\u30bf \u30d5\u30ec\u30fc\u30e0\u5185\u306e\u5217\u3067\u306e<strong>lagply()<\/strong>\u306e\u4f7f\u7528\u4f8b\u3092\u3044\u304f\u3064\u304b\u793a\u3057\u307e\u3059\u3002<\/span><\/p>\n<pre style=\"background-color: #e5e5e5; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#create a data frame with three columns and five rows\n<\/span>data &lt;- data.frame(a = c(1, 3, 7, 12, 9),\n                   b = c(4, 4, 6, 7, 8),\n                   c = c(14, 15, 11, 10, 6))\ndata\n\n#abc\n#1 1 4 14\n#2 3 4 15\n#3 7 6 11\n#4 12 7 10\n#5 9 8 6\n\n<span style=\"color: #008080;\">#find mean of each column and return results as a list<\/span>\napply(data, mean)\n\n#$a\n# [1] 6.4\n#\n# $b\n# [1] 5.8\n#\n# $c\n# [1] 11.2\n\n<span style=\"color: #008080;\">#multiply values in each column by 2 and return results as a list<\/span>\nlapply(data, function(data) data*2)\n\n#$a\n# [1] 2 6 14 24 18\n#\n# $b\n# [1] 8 8 12 14 16\n#\n# $c\n# [1] 28 30 22 20 12\n<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u307e\u305f\u3001 <strong>lapply() \u3092<\/strong>\u4f7f\u7528\u3057\u3066\u30ea\u30b9\u30c8\u306b\u5bfe\u3059\u308b\u64cd\u4f5c\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u6b21\u306e\u4f8b\u306f\u3001\u3053\u308c\u3092\u884c\u3046\u65b9\u6cd5\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<pre style=\"background-color: #e5e5e5; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#create a list\n<\/span>x &lt;- list(a=1, b=1:5, c=1:10) \nx\n\n#$a\n# [1] 1\n#\n# $b\n# [1] 1 2 3 4 5\n#\n# $c\n# [1] 1 2 3 4 5 6 7 8 9 10\n\n<span style=\"color: #008080;\">#find the sum of each element in the list<\/span>\nlapply(x, sum)\n\n#$a\n# [1] 1\n#\n# $b\n# [1] 15\n#\n# $c\n#[1]55\n\n<span style=\"color: #008080;\">#find the mean of each element in the list<\/span>\nlapply(x, mean)\n\n#$a\n# [1] 1\n#\n# $b\n# [1] 3\n#\n# $c\n# [1] 5.5\n\n<span style=\"color: #008080;\">#multiply values of each element by 5 and return results as a list<\/span>\nlapply(x, function(x) x*5)\n\n#$a\n# [1] 5\n#\n# $b\n# [1] 5 10 15 20 25\n#\n# $c\n# [1] 5 10 15 20 25 30 35 40 45 50\n<\/strong><\/pre>\n<h2><span style=\"color: #000000;\"><strong>\u9069\u7528\u3059\u308b\uff08\uff09<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">\u30ea\u30b9\u30c8\u3001\u30d9\u30af\u30c8\u30eb\u3001\u307e\u305f\u306f\u30c7\u30fc\u30bf \u30d5\u30ec\u30fc\u30e0\u306e\u5404\u8981\u7d20\u306b\u95a2\u6570\u3092\u9069\u7528\u3057\u3066\u3001\u30ea\u30b9\u30c8\u306e\u4ee3\u308f\u308a\u306b<strong>\u30d9\u30af\u30c8\u30eb<\/strong>\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\u306f\u3001 <strong>sapply()<\/strong>\u95a2\u6570\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/span><\/p>\n<p> <span style=\"color: #000000;\">sapply() \u95a2\u6570\u306e\u57fa\u672c\u69cb\u6587\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/span><\/p>\n<p style=\"text-align: center;\"><span style=\"color: #000000;\"><strong>\u9069\u7528 (X\u3001FUN)<\/strong><\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">X \u306f\u30ea\u30b9\u30c8\u3001\u30d9\u30af\u30c8\u30eb\u3001\u307e\u305f\u306f\u30c7\u30fc\u30bf \u30d5\u30ec\u30fc\u30e0\u306e\u540d\u524d\u3067\u3059\u3002<\/span><\/li>\n<li> <span style=\"color: #000000;\">FUN \u306f\u5b9f\u884c\u3057\u305f\u3044\u7279\u5b9a\u306e\u64cd\u4f5c\u3067\u3059<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u3001\u30c7\u30fc\u30bf \u30d5\u30ec\u30fc\u30e0\u5185\u306e\u5217\u3067<strong>sapply()<\/strong>\u3092\u4f7f\u7528\u3059\u308b\u4f8b\u3092\u3044\u304f\u3064\u304b\u793a\u3057\u307e\u3059\u3002<\/span><\/p>\n<pre style=\"background-color: #e5e5e5; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#create a data frame with three columns and five rows\n<\/span>data &lt;- data.frame(a = c(1, 3, 7, 12, 9),\n                   b = c(4, 4, 6, 7, 8),\n                   c = c(14, 15, 11, 10, 6))\ndata\n\n#abc\n#1 1 4 14\n#2 3 4 15\n#3 7 6 11\n#4 12 7 10\n#5 9 8 6\n\n<span style=\"color: #008080;\">#find mean of each column and return results as a vector\n<\/span>sapply(data, mean)\n\n#abc\n#6.4 5.8 11.2 \n\n<span style=\"color: #008080;\">#multiply values in each column by 2 and return results as a matrix\n<\/span>sapply(data, function(data) data*2)\n\n#abc\n#[1,] 2 8 28\n#[2,] 6 8 30\n#[3,] 14 12 22\n#[4,] 24 14 20\n#[5,] 18 16 12<\/strong><\/pre>\n<p> <span style=\"color: #000000;\"><strong>sapply() \u3092<\/strong>\u4f7f\u7528\u3057\u3066\u30ea\u30b9\u30c8\u306b\u5bfe\u3059\u308b\u64cd\u4f5c\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u6b21\u306e\u4f8b\u306f\u3001\u3053\u308c\u3092\u884c\u3046\u65b9\u6cd5\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<pre style=\"background-color: #e5e5e5; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#create a list\n<\/span>x &lt;- list(a=1, b=1:5, c=1:10) \nx\n\n#$a\n# [1] 1\n#\n# $b\n# [1] 1 2 3 4 5\n#\n# $c\n# [1] 1 2 3 4 5 6 7 8 9 10\n\n<span style=\"color: #008080;\">#find the sum of each element in the list<\/span>\nsapply(x, sum)\n\n#abc\n#1 15 55 \n\n<span style=\"color: #008080;\">#find the mean of each element in the list<\/span>\nsapply(x, mean)\n\n#abc\n#1.0 3.0 5.5\n<\/strong><\/pre>\n<h2><span style=\"color: #000000;\"><strong>\u30bf\u30c3\u30d7()<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">\u30d9\u30af\u30c8\u30eb\u306e\u30b5\u30d6\u30bb\u30c3\u30c8\u306b\u95a2\u6570\u3092\u9069\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u3001\u305d\u306e\u30b5\u30d6\u30bb\u30c3\u30c8\u304c\u5225\u306e\u30d9\u30af\u30c8\u30eb (\u901a\u5e38\u306f\u56e0\u5b50) \u306b\u3088\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f<strong>\u3001tapply()<\/strong>\u95a2\u6570\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/span><\/p>\n<p> <span style=\"color: #000000;\">Tapply() \u95a2\u6570\u306e\u57fa\u672c\u69cb\u6587\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/span><\/p>\n<p style=\"text-align: center;\"><span style=\"color: #000000;\"><strong>\u30bf\u30c3\u30d7(X\u3001INDEX\u3001FUN)<\/strong><\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">X \u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u540d\u524d\u3067\u3001\u901a\u5e38\u306f\u30d9\u30af\u30c8\u30eb\u3067\u3059\u3002<\/span><\/li>\n<li> <span style=\"color: #000000;\">INDEX \u306f 1 \u3064\u4ee5\u4e0a\u306e\u8981\u7d20\u306e\u30ea\u30b9\u30c8\u3067\u3059<\/span><\/li>\n<li><span style=\"color: #000000;\">FUN \u306f\u5b9f\u884c\u3057\u305f\u3044\u7279\u5b9a\u306e\u64cd\u4f5c\u3067\u3059<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u3001iris \u306b\u57cb\u3081\u8fbc\u307e\u308c\u305f R \u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3067<strong>Tapply()<\/strong>\u3092\u4f7f\u7528\u3059\u308b\u4f8b\u3092\u793a\u3057\u3066\u3044\u307e\u3059<strong><em>\u3002<\/em><\/strong><\/span><\/p>\n<pre style=\"background-color: #e5e5e5; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#view first six lines of <em>iris<\/em> dataset<\/span>\nhead(iris)\n\n# Sepal.Length Sepal.Width Petal.Length Petal.Width Species\n#1 5.1 3.5 1.4 0.2 setosa\n#2 4.9 3.0 1.4 0.2 setosa\n#3 4.7 3.2 1.3 0.2 setosa\n#4 4.6 3.1 1.5 0.2 setosa\n#5 5.0 3.6 1.4 0.2 setosa\n#6 5.4 3.9 1.7 0.4 setosa\n\n<span style=\"color: #008080;\">#find the max Sepal.Length of each of the three Species<\/span>\ntapply(iris$Sepal.Length, iris$Species, max)\n\n#setosa versicolor virginica \n#5.8 7.0 7.9 \n\n<span style=\"color: #008080;\">#find the mean Sepal.Width of each of the three Species\n<\/span>tapply(iris$Sepal.Width, iris$Species, mean)\n\n# setosa versicolor virginica \n# 3,428 2,770 2,974\n\n<span style=\"color: #008080;\">#find the minimum Petal.Width of each of the three Species\n<\/span>tapply(iris$Petal.Width, iris$Species, min)\n\n# setosa versicolor virginica \n#0.1 1.0 1.4 \n<\/strong><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001R \u306e\u7d44\u307f\u8fbc\u307f\u95a2\u6570apply() \u3001 sapply() \u3001 lapply()\u3001 tapply()\u306e\u9055\u3044\u3092\u3001\u5404\u95a2\u6570\u306e\u4f7f\u7528\u6642\u671f\u3068\u4f7f\u7528\u65b9\u6cd5\u306e\u4f8b\u3068\u3068\u3082\u306b\u8aac\u660e\u3057\u307e\u3059\u3002 \u9069\u7528\u3059\u308b\uff08\uff09 \u884c\u5217\u307e\u305f\u306f\u30c7\u30fc\u30bf \u30d5\u30ec\u30fc [&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-466","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 \u306e apply()\u3001lapply()\u3001sapply()\u3001tapply() \u306e\u30ac\u30a4\u30c9 - \u8a18\u4e8b<\/title>\n<meta name=\"description\" content=\"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001R \u306e\u7d44\u307f\u8fbc\u307f\u95a2\u6570 apply()\u3001sapply()\u3001lapply()\u3001tapply() \u306e\u9055\u3044\u3092\u4f7f\u7528\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\/rapply-sapply\u3068tapply\u3092\u9069\u7528\u3059\u308b\u305f\u3081\u306e\u30ab\u3099\u30a4\u30c8\u3099\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"R \u306e apply()\u3001lapply()\u3001sapply()\u3001tapply() \u306e\u30ac\u30a4\u30c9 - \u8a18\u4e8b\" \/>\n<meta property=\"og:description\" content=\"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001R \u306e\u7d44\u307f\u8fbc\u307f\u95a2\u6570 apply()\u3001sapply()\u3001lapply()\u3001tapply() \u306e\u9055\u3044\u3092\u4f7f\u7528\u4f8b\u3068\u3068\u3082\u306b\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/ja\/rapply-sapply\u3068tapply\u3092\u9069\u7528\u3059\u308b\u305f\u3081\u306e\u30ab\u3099\u30a4\u30c8\u3099\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-29T19:40:31+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\/rapply-sapply%e3%81%a8tapply%e3%82%92%e9%81%a9%e7%94%a8%e3%81%99%e3%82%8b%e3%81%9f%e3%82%81%e3%81%ae%e3%82%ab%e3%82%99%e3%82%a4%e3%83%88%e3%82%99\/\",\"url\":\"https:\/\/statorials.org\/ja\/rapply-sapply%e3%81%a8tapply%e3%82%92%e9%81%a9%e7%94%a8%e3%81%99%e3%82%8b%e3%81%9f%e3%82%81%e3%81%ae%e3%82%ab%e3%82%99%e3%82%a4%e3%83%88%e3%82%99\/\",\"name\":\"R \u306e apply()\u3001lapply()\u3001sapply()\u3001tapply() \u306e\u30ac\u30a4\u30c9 - \u8a18\u4e8b\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/ja\/#website\"},\"datePublished\":\"2023-07-29T19:40:31+00:00\",\"dateModified\":\"2023-07-29T19:40:31+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\u7d44\u307f\u8fbc\u307f\u95a2\u6570 apply()\u3001sapply()\u3001lapply()\u3001tapply() \u306e\u9055\u3044\u3092\u4f7f\u7528\u4f8b\u3068\u3068\u3082\u306b\u8aac\u660e\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/ja\/rapply-sapply%e3%81%a8tapply%e3%82%92%e9%81%a9%e7%94%a8%e3%81%99%e3%82%8b%e3%81%9f%e3%82%81%e3%81%ae%e3%82%ab%e3%82%99%e3%82%a4%e3%83%88%e3%82%99\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/ja\/rapply-sapply%e3%81%a8tapply%e3%82%92%e9%81%a9%e7%94%a8%e3%81%99%e3%82%8b%e3%81%9f%e3%82%81%e3%81%ae%e3%82%ab%e3%82%99%e3%82%a4%e3%83%88%e3%82%99\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/ja\/rapply-sapply%e3%81%a8tapply%e3%82%92%e9%81%a9%e7%94%a8%e3%81%99%e3%82%8b%e3%81%9f%e3%82%81%e3%81%ae%e3%82%ab%e3%82%99%e3%82%a4%e3%83%88%e3%82%99\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u5bb6\",\"item\":\"https:\/\/statorials.org\/ja\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"R \u306e apply()\u3001lapply()\u3001sapply()\u3001tapply() \u306e\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":"R \u306e apply()\u3001lapply()\u3001sapply()\u3001tapply() \u306e\u30ac\u30a4\u30c9 - \u8a18\u4e8b","description":"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001R \u306e\u7d44\u307f\u8fbc\u307f\u95a2\u6570 apply()\u3001sapply()\u3001lapply()\u3001tapply() \u306e\u9055\u3044\u3092\u4f7f\u7528\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\/rapply-sapply\u3068tapply\u3092\u9069\u7528\u3059\u308b\u305f\u3081\u306e\u30ab\u3099\u30a4\u30c8\u3099\/","og_locale":"ja_JP","og_type":"article","og_title":"R \u306e apply()\u3001lapply()\u3001sapply()\u3001tapply() \u306e\u30ac\u30a4\u30c9 - \u8a18\u4e8b","og_description":"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001R \u306e\u7d44\u307f\u8fbc\u307f\u95a2\u6570 apply()\u3001sapply()\u3001lapply()\u3001tapply() \u306e\u9055\u3044\u3092\u4f7f\u7528\u4f8b\u3068\u3068\u3082\u306b\u8aac\u660e\u3057\u307e\u3059\u3002","og_url":"https:\/\/statorials.org\/ja\/rapply-sapply\u3068tapply\u3092\u9069\u7528\u3059\u308b\u305f\u3081\u306e\u30ab\u3099\u30a4\u30c8\u3099\/","og_site_name":"Statorials","article_published_time":"2023-07-29T19:40:31+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\/rapply-sapply%e3%81%a8tapply%e3%82%92%e9%81%a9%e7%94%a8%e3%81%99%e3%82%8b%e3%81%9f%e3%82%81%e3%81%ae%e3%82%ab%e3%82%99%e3%82%a4%e3%83%88%e3%82%99\/","url":"https:\/\/statorials.org\/ja\/rapply-sapply%e3%81%a8tapply%e3%82%92%e9%81%a9%e7%94%a8%e3%81%99%e3%82%8b%e3%81%9f%e3%82%81%e3%81%ae%e3%82%ab%e3%82%99%e3%82%a4%e3%83%88%e3%82%99\/","name":"R \u306e apply()\u3001lapply()\u3001sapply()\u3001tapply() \u306e\u30ac\u30a4\u30c9 - \u8a18\u4e8b","isPartOf":{"@id":"https:\/\/statorials.org\/ja\/#website"},"datePublished":"2023-07-29T19:40:31+00:00","dateModified":"2023-07-29T19:40:31+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\u7d44\u307f\u8fbc\u307f\u95a2\u6570 apply()\u3001sapply()\u3001lapply()\u3001tapply() \u306e\u9055\u3044\u3092\u4f7f\u7528\u4f8b\u3068\u3068\u3082\u306b\u8aac\u660e\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/statorials.org\/ja\/rapply-sapply%e3%81%a8tapply%e3%82%92%e9%81%a9%e7%94%a8%e3%81%99%e3%82%8b%e3%81%9f%e3%82%81%e3%81%ae%e3%82%ab%e3%82%99%e3%82%a4%e3%83%88%e3%82%99\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/ja\/rapply-sapply%e3%81%a8tapply%e3%82%92%e9%81%a9%e7%94%a8%e3%81%99%e3%82%8b%e3%81%9f%e3%82%81%e3%81%ae%e3%82%ab%e3%82%99%e3%82%a4%e3%83%88%e3%82%99\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/ja\/rapply-sapply%e3%81%a8tapply%e3%82%92%e9%81%a9%e7%94%a8%e3%81%99%e3%82%8b%e3%81%9f%e3%82%81%e3%81%ae%e3%82%ab%e3%82%99%e3%82%a4%e3%83%88%e3%82%99\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u5bb6","item":"https:\/\/statorials.org\/ja\/"},{"@type":"ListItem","position":2,"name":"R \u306e apply()\u3001lapply()\u3001sapply()\u3001tapply() \u306e\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\/466","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=466"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/posts\/466\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/media?parent=466"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/categories?post=466"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/tags?post=466"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}