{"id":2687,"date":"2021-09-18T12:17:05","date_gmt":"2021-09-18T03:17:05","guid":{"rendered":"https:\/\/plaza.umin.ac.jp\/~OIO\/?p=2687"},"modified":"2021-09-19T11:23:09","modified_gmt":"2021-09-19T02:23:09","slug":"%e7%97%87%e4%be%8b%e7%b5%84%e3%81%bf%e5%85%a5%e3%82%8c%e5%9b%b3%e3%82%92r%e3%81%a7%e6%9b%b8%e3%81%84%e3%81%a6%e3%81%bf%e3%81%be%e3%81%97%e3%81%9f","status":"publish","type":"post","link":"https:\/\/plaza.umin.ac.jp\/~OIO\/?p=2687","title":{"rendered":"\u75c7\u4f8b\u7d44\u307f\u5165\u308c\u56f3\u3092R\u3067\u66f8\u3044\u3066\u307f\u307e\u3057\u305f"},"content":{"rendered":"<h1>\u75c7\u4f8b\u7d44\u307f\u5165\u308c\u56f3\u3092R\u3067\u66f8\u3044\u3066\u307f\u307e\u3057\u305f<\/h1>\n<p>\u6b21\u306e\u56f3\u306f\u300c<a href=\"http:\/\/www.consort-statement.org\/Media\/Default\/Downloads\/Translations\/Japanese_jp\/Japanese%20CONSORT%20Statement.pdf\">CONSORT\u58f0\u660e<\/a>\u300d\u3068\u547c\u3070\u308c\u308b\u3001\u81e8\u5e8a\u8a66\u9a13\u306b\u3064\u3044\u3066\u6b63\u78ba\u306b\u5831\u544a\u3059\u308b\u305f\u3081\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u4e2d\u306b\u3042\u308b\u3001\u75c7\u4f8b\u306e\u7d44\u307f\u5165\u308c\u3092\u8aac\u660e\u3059\u308b\u305f\u3081\u306e\u56f3\u3067\u3059\u3002\u3053\u306e\u30d6\u30ed\u30b0\u306e\u30bf\u30a4\u30c8\u30eb\u3067\u306f\u53d6\u308a\u5408\u3048\u305a\u300c\u75c7\u4f8b\u7d44\u307f\u5165\u308c\u56f3\u300d\u3068\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/1c3a0de34858ed58929535eed609a7d1.png\" alt=\"\" width=\"634\" height=\"602\" class=\"aligncenter size-full wp-image-2688\" srcset=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/1c3a0de34858ed58929535eed609a7d1.png 634w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/1c3a0de34858ed58929535eed609a7d1-300x285.png 300w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/1c3a0de34858ed58929535eed609a7d1-150x142.png 150w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/1c3a0de34858ed58929535eed609a7d1-500x475.png 500w\" sizes=\"auto, (max-width: 634px) 100vw, 634px\" \/><\/p>\n<p>\u8ad6\u6587\u306e\u4e2d\u306e\u56f3\uff12\u306b\u306f\u3053\u306e\u75c7\u4f8b\u7d44\u307f\u5165\u308c\u56f3\u306e\u3053\u3068\u3092\u300c\u30d5\u30ed\u30fc\u30c1\u30e3\u30fc\u30c8\u300d\u3068\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002\u539f\u6587\u3067\u306f\u201dflow diagram\u201d\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u6c17\u306b\u306a\u308c\u3070\u3001power point\u3067\u3082inkscaped\u3067\u3082excel\u3067\u3082\u75c7\u4f8b\u7d44\u307f\u5165\u308c\u56f3\u3092\u66f8\u304f\u4e8b\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u3053\u308c\u3092R\u3067\u66f8\u3044\u3066\u307f\u3088\u3046\u3068\u601d\u3063\u305f\u306e\u3067\u3001\u305d\u306e\u5fd8\u5099\u9332\u3068\u3057\u3066\u8a18\u8f09\u3057\u307e\u3059\u3002R\u3067\u66f8\u304f\u306e\u306bGmisc\u3068\u3044\u3046\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4f7f\u7528\u3057\u307e\u3057\u305f\u3002<\/p>\n<h1>\u307e\u305a\u306f\u5b8c\u6210\u3057\u305f\u75c7\u4f8b\u7d44\u307f\u5165\u308c\u56f3<\/h1>\n<p>\u4eca\u56de\u3068\u308a\u3042\u3048\u305a\u66f8\u3044\u305f\u75c7\u4f8b\u7d44\u307f\u5165\u308c\u56f3\u306f\u6b21\u306e\u3088\u3046\u306a\u56f3\u3067\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/StudyDiagram.png\" alt=\"\" width=\"875\" height=\"574\" class=\"aligncenter size-full wp-image-2692\" srcset=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/StudyDiagram.png 875w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/StudyDiagram-300x197.png 300w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/StudyDiagram-700x459.png 700w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/StudyDiagram-150x98.png 150w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/StudyDiagram-768x504.png 768w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/StudyDiagram-500x328.png 500w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/StudyDiagram-800x525.png 800w\" sizes=\"auto, (max-width: 875px) 100vw, 875px\" \/><\/p>\n<p>Fundermentals of Clinical Trials 4th Edition\u306eDefinition of Study Population\u3068\u3044\u3046\u9805\u306e\u56f3\u3092\u53c2\u8003\u306b\u3057\u3066\u3044\u307e\u3059\uff08\u6570\u5b57\u306f\u52dd\u624b\u306b\u8ffd\u52a0\u3057\u307e\u3057\u305f\uff09<\/p>\n<h2>\u4e0a\u306e\u75c7\u4f8b\u7d44\u307f\u5165\u308c\u56f3\u306eR\u306e\u30b3\u30fc\u30c9\u3067\u3059<\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># install.packages('Gmisc', dependencies = TRUE)\r\n\r\nlibrary(Gmisc) \r\nlibrary(glue) \r\nlibrary(htmlTable) \r\nlibrary(grid) \r\nlibrary(magrittr) \r\n\r\norg_cohort &lt;- boxGrob(glue(\"Population at large\", \r\n                           \"n = {pop}\", pop = txtInt(9999), .sep = \"\\n\")) \r\neligible &lt;- boxGrob(glue(\"Population with Condition\",\r\n                         \"n = {pop}\", pop = txtInt(999), .sep = \"\\n\")) \r\nincluded0 &lt;- boxGrob(glue(\"Study Population\", \r\n                          \"n = {incl}\", incl = txtInt(900), .sep = \"\\n\")) \r\nexcluded0 &lt;- boxGrob(glue(\"Population without Condition\",\r\n                          \"n = {exc0}\", exc0 = txtInt(9000), .sep = \"\\n\"), just = \"left\") \r\nexcluded &lt;- boxGrob(glue(\"With Condition but Ineligible\",\r\n                         \"n = {tot}\", tot = txtInt(99), .sep = \"\\n\"), just = \"left\") \r\n\r\ngrid.newpage() \r\n\r\nvert &lt;- spreadVertical(org_cohort = org_cohort, eligible = eligible, included0 = included0) \r\n\r\n\r\n\r\nexcluded0 &lt;- moveBox(excluded0, x = .8, y = coords(vert$eligible)$top \r\n                     + distance(vert$org_cohort, vert$eligible, half = TRUE, center = FALSE)) \r\nexcluded &lt;- moveBox(excluded, x = .8, y = coords(vert$included0)$top \r\n                    + distance(vert$eligible, vert$included0, half = TRUE, center = FALSE)) \r\n\r\nfor (i in 1:(length(vert) - 1)) \r\n{ connectGrob(vert[[i]], vert[[i + 1]], type = \"vert\") %&gt;% print } \r\n\r\nconnectGrob(vert$org_cohort, excluded0, type = \"L\") \r\nconnectGrob(vert$eligible, excluded, type = \"L\") \r\n\r\n# Print boxes vert \r\nexcluded \r\nexcluded0\r\nvert\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h1>\u3082\u3046\u4e00\u4f8b\u5225\u306e\u75c7\u4f8b\u7d44\u307f\u5165\u308c\u56f3\u3067\u3059<\/h1>\n<p>\u3053\u3061\u3089\u306f\u3001<a href=\"https:\/\/cran.r-project.org\/web\/packages\/Gmisc\/vignettes\/Grid-based_flowcharts.html\">CRAN\u306e\u30db\u30fc\u30e0\u30da\u30fc\u30b8<\/a>\u3067\u793a\u3055\u308c\u3066\u3044\u308b\u4f8b\u3067\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/GmiscExample.r.png\" alt=\"\" width=\"875\" height=\"574\" class=\"aligncenter size-full wp-image-2693\" srcset=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/GmiscExample.r.png 875w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/GmiscExample.r-300x197.png 300w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/GmiscExample.r-700x459.png 700w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/GmiscExample.r-150x98.png 150w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/GmiscExample.r-768x504.png 768w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/GmiscExample.r-500x328.png 500w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/GmiscExample.r-800x525.png 800w\" sizes=\"auto, (max-width: 875px) 100vw, 875px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>\u3053\u3061\u3089\u306e\u75c7\u4f8b\u7d44\u307f\u5165\u308c\u56f3\u306eR\u306e\u30b3\u30fc\u30c9\u3067\u3059<\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">library(Gmisc, quietly = TRUE)\r\nlibrary(glue)\r\nlibrary(htmlTable)\r\nlibrary(grid)\r\nlibrary(magrittr)\r\n\r\norg_cohort &lt;- boxGrob(glue(\"Stockholm population\",\r\n                           \"n = {pop}\",\r\n                           pop = txtInt(1632798),\r\n                           .sep = \"\\n\"))\r\neligible &lt;- boxGrob(glue(\"Eligible\",\r\n                          \"n = {pop}\",\r\n                           pop = txtInt(10032),\r\n                           .sep = \"\\n\"))\r\nincluded &lt;- boxGrob(glue(\"Randomized\",\r\n                         \"n = {incl}\",\r\n                         incl = txtInt(122),\r\n                         .sep = \"\\n\"))\r\ngrp_a &lt;- boxGrob(glue(\"Treatment A\",\r\n                      \"n = {recr}\",\r\n                      recr = txtInt(43),\r\n                      .sep = \"\\n\"))\r\n\r\ngrp_b &lt;- boxGrob(glue(\"Treatment B\",\r\n                      \"n = {recr}\",\r\n                      recr = txtInt(122 - 43 - 30),\r\n                      .sep = \"\\n\"))\r\n\r\nexcluded &lt;- boxGrob(glue(\"Excluded (n = {tot}):\",\r\n                         \" - not interested: {uninterested}\",\r\n                         \" - contra-indicated: {contra}\",\r\n                         tot = 30,\r\n                         uninterested = 12,\r\n                         contra = 30 - 12,\r\n                         .sep = \"\\n\"),\r\n                    just = \"left\")\r\n\r\ngrid.newpage()\r\nvert &lt;- spreadVertical(org_cohort,\r\n                       eligible = eligible,\r\n                       included = included,\r\n                       grps = grp_a)\r\ngrps &lt;- alignVertical(reference = vert$grps,\r\n                      grp_a, grp_b) %&gt;%\r\n  spreadHorizontal()\r\nvert$grps &lt;- NULL\r\n\r\nexcluded &lt;- moveBox(excluded,\r\n                    x = .8,\r\n                    y = coords(vert$included)$top + distance(vert$eligible, vert$included, half = TRUE, center = FALSE))\r\n\r\nfor (i in 1:(length(vert) - 1)) {\r\n  connectGrob(vert[[i]], vert[[i + 1]], type = \"vert\") %&gt;%\r\n    print\r\n}\r\nconnectGrob(vert$included, grps[[1]], type = \"N\")\r\nconnectGrob(vert$included, grps[[2]], type = \"N\")\r\n\r\nconnectGrob(vert$eligible, excluded, type = \"L\")\r\n\r\n# Print boxes\r\nvert\r\ngrps\r\nexcluded<\/pre>\n<p>&nbsp;<\/p>\n<h2>Gmisc\u306e\u4f7f\u3044\u65b9<\/h2>\n<p>Gmisc\u306e\u5927\u4f53\u306e\u4f7f\u3044\u65b9\u306f\u308f\u304b\u3063\u305f\u3082\u306e\u306e\u3001\u3057\u3063\u304b\u308a\u3068\u4f7f\u3044\u65b9\u3092\u78ba\u8a8d\u3057\u3088\u3046\u3068\u601d\u3063\u3066\u307e\u305a\u306f\u30b0\u30b0\u3063\u3066\u307f\u307e\u3057\u305f\u3002\u6b8b\u5ff5\u306a\u304c\u3089\u65e5\u672c\u8a9e\u3067\u306e\u8a73\u3057\u3044\u89e3\u8aac\u6587\u304c\u3042\u307e\u308a\u3042\u308a\u307e\u305b\u3093\u3002\u3053\u3053\u304b\u3089\u3057\u3070\u3089\u304f\u306f<a href=\"https:\/\/cran.r-project.org\/web\/packages\/Gmisc\/vignettes\/Grid-based_flowcharts.html\">CRAN\u306e\u89e3\u8aac\u6587<\/a>\u306e\u7ffb\u8a33\u307f\u305f\u3044\u306a\u3082\u306e\u3067\u3059\u3002<\/p>\n<hr \/>\n<h3>Gmisc\u306e\u57fa\u672c\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u8aac\u660e<\/h3>\n<p>\u75c7\u4f8b\u7d44\u307f\u5165\u308c\u56f3\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u308b\u57fa\u672c\u7684\u306a\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u30dc\u30c3\u30af\u30b9\uff1a <strong>boxGrob<\/strong>\u95a2\u6570\u3068<strong>boxPropGrob<\/strong>\u95a2\u6570\u3067\u751f\u6210\u3055\u308c\u307e\u3059\u3002<br \/>\n\u30dc\u30c3\u30af\u30b9\u9593\u306e\u77e2\u5370\u306f\u3001<strong>connectGrob<\/strong>\u95a2\u6570\u306b\u3088\u3063\u3066\u751f\u6210\u3055\u308c\u308b\u3002<br \/>\n\u3053\u308c\u3089\u306f\u76f4\u63a5\u914d\u7f6e\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u308b\u3057\u3001\u4ee5\u4e0b\u306e\u539f\u5247\u306b\u5f93\u3063\u3066\u64cd\u4f5c\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u308b\u3002<\/p>\n<p>Spread &#8211; \u30d7\u30ed\u30c3\u30c8\u5168\u4f53\u3092\u4f7f\u7528\u3057\u305f\u3044\u306e\u3067\u3001\u5404\u8981\u7d20\u3092\u914d\u7f6e\u3059\u308b\u304b\u3001\u307e\u305f\u306f\u81ea\u52d5\u7684\u306b\u5782\u76f4\u307e\u305f\u306f\u6c34\u5e73\u65b9\u5411\u306b\u5e83\u3052\u308b\u305f\u3081\u3001<strong>spreadHorizontal<\/strong> \u304a\u3088\u3073 <strong>spreadVertical<\/strong> \u95a2\u6570\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<br \/>\n\u30dc\u30c3\u30af\u30b9\u306e\u6574\u5217 &#8211; \u62e1\u6563\u306e\u524d\u307e\u305f\u306f\u5f8c\u306b\u3001\u30dc\u30c3\u30af\u30b9\u3092\u6574\u5217\u3055\u305b\u305f\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\uff1a <strong>alignHorizontal<\/strong> \u304a\u3088\u3073 <strong>alignVertical<\/strong> \u95a2\u6570\u3002<\/p>\n<p>&nbsp;<\/p>\n<h3>\u57fa\u672c\u7684\u306a\u30dc\u30c3\u30af\u30b9<\/h3>\n<p>\u307e\u305a\u306f1\u3064\u306e\u30dc\u30c3\u30af\u30b9\u3092\u51fa\u529b\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">grid.newpage() #\u63cf\u753b\u3059\u308b\u5834\u6240\u306e\u521d\u671f\u5316\r\ntxt &lt;-\r\n\"Just a plain box\r\nwith some text\r\n- Note that newline is OK\"\r\nboxGrob(txt) #txt\u306b\u5165\u3063\u3066\u3044\u308b\u6587\u5b57\u5217\u3092\u305d\u306e\u307e\u307e\u30dc\u30c3\u30af\u30b9\u306e\u4e2d\u306b\u8868\u793a\u3057\u307e\u3059\u3002\u6539\u884c\u306e\u60c5\u5831\u3082\u305d\u306e\u307e\u307e\u4ee3\u5165\u3055\u308c\u3066\u3044\u307e\u3059\u3002\\n \u3067\u3082\u826f\u3044\u3088\u3046\u3067\u3059\u3002<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/figure1.png\" alt=\"\" width=\"693\" height=\"418\" class=\"aligncenter size-full wp-image-2775\" srcset=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/figure1.png 693w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/figure1-300x181.png 300w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/figure1-150x90.png 150w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/figure1-500x302.png 500w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u3053\u306e\u30dc\u30c3\u30af\u30b9\u306b\u3001\u4efb\u610f\u306e\u8981\u7d20\u3068\u3057\u3066\u914d\u7f6e\u3084\u30b9\u30bf\u30a4\u30eb\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">grid.newpage()\r\nboxGrob(\"A large\\noffset\\nyellow\\nbox\",\r\n        width = .8, height = .8,\r\n        x = 0, y = 0,\r\n        bjust = c(\"left\", \"bottom\"),\r\n        txt_gp = gpar(col = \"darkblue\", cex = 2),\r\n        box_gp = gpar(fill = \"lightyellow\", col = \"darkblue\"))<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/figure2.png\" alt=\"\" width=\"693\" height=\"418\" class=\"aligncenter size-full wp-image-2777\" srcset=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/figure2.png 693w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/figure2-300x181.png 300w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/figure2-150x90.png 150w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/figure2-500x302.png 500w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3>\u30d7\u30ed\u30dd\u30fc\u30b7\u30e7\u30f3\u3092\u8868\u793a\u3059\u308b\u30dc\u30c3\u30af\u30b9<\/h3>\n<p>boxPropGrob\u306f\u3001\u305d\u306e\u540d\u306e\u901a\u308a\u30d7\u30ed\u30dd\u30fc\u30b7\u30e7\u30f3\u3092\u8868\u793a\u3059\u308b\u305f\u3081\u306e\u3082\u306e\u3067\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">grid.newpage()\r\nboxPropGrob(\"A box with proportions\",\r\n            \"Left side\", \"Right side\",\r\n            prop = .7)\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/figure3.png\" alt=\"\" width=\"693\" height=\"418\" class=\"aligncenter size-full wp-image-2778\" srcset=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/figure3.png 693w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/figure3-300x181.png 300w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/figure3-150x90.png 150w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/figure3-500x302.png 500w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3>\u30dc\u30c3\u30af\u30b9\u306e\u5ea7\u6a19<\/h3>\n<p>\u30dc\u30c3\u30af\u30b9\u306b\u306f\u3001\u30dc\u30c3\u30af\u30b9\u3068\u306e\u9593\u306b\u7c21\u5358\u306b\u7dda\u3092\u5f15\u304f\u3053\u3068\u304c\u3067\u304d\u308b\u5ea7\u6a19\u304c\u3042\u308a\u307e\u3059\u3002\u5ea7\u6a19\u306f\u3001coords \u5c5e\u6027\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u4e0b\u306e\u56f3\u306f\u30012\u3064\u306e\u30dc\u30c3\u30af\u30b9\u306e\u5ea7\u6a19\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">grid.newpage()\r\nsmpl_bx &lt;- boxGrob(\r\n  label = \"A simple box\",\r\n  x = .5,\r\n  y = .9,\r\n  just = \"center\")\r\n\r\nprop_bx &lt;- boxPropGrob(\r\n  label = \"A split box\",\r\n  label_left = \"Left side\",\r\n  label_right = \"Right side\",\r\n  x = .5,\r\n  y = .3,\r\n  prop = .3,\r\n  just = \"center\")\r\n\r\nplot(smpl_bx)\r\nplot(prop_bx)\r\n\r\nsmpl_bx_coords &lt;- coords(smpl_bx)\r\ngrid.circle(y = smpl_bx_coords$y,\r\n            x = smpl_bx_coords$x,\r\n            r = unit(2, \"mm\"),\r\n            gp = gpar(fill = \"#FFFFFF99\", col = \"black\"))\r\ngrid.circle(y = smpl_bx_coords$bottom,\r\n            x = smpl_bx_coords$right,\r\n            r = unit(1, \"mm\"),\r\n            gp = gpar(fill = \"red\"))\r\ngrid.circle(y = smpl_bx_coords$top,\r\n            x = smpl_bx_coords$right,\r\n            r = unit(1, \"mm\"),\r\n            gp = gpar(fill = \"purple\"))\r\ngrid.circle(y = smpl_bx_coords$bottom,\r\n            x = smpl_bx_coords$left,\r\n            r = unit(1, \"mm\"),\r\n            gp = gpar(fill = \"blue\"))\r\ngrid.circle(y = smpl_bx_coords$top,\r\n            x = smpl_bx_coords$left,\r\n            r = unit(1, \"mm\"),\r\n            gp = gpar(fill = \"orange\"))\r\n\r\nprop_bx_coords &lt;- coords(prop_bx)\r\ngrid.circle(y = prop_bx_coords$y,\r\n            x = prop_bx_coords$x,\r\n            r = unit(2, \"mm\"),\r\n            gp = gpar(fill = \"#FFFFFF99\", col = \"black\"))\r\ngrid.circle(y = prop_bx_coords$bottom,\r\n            x = prop_bx_coords$right_x,\r\n            r = unit(1, \"mm\"),\r\n            gp = gpar(fill = \"red\"))\r\ngrid.circle(y = prop_bx_coords$top,\r\n            x = prop_bx_coords$right_x,\r\n            r = unit(1, \"mm\"),\r\n            gp = gpar(fill = \"purple\"))\r\ngrid.circle(y = prop_bx_coords$bottom,\r\n            x = prop_bx_coords$left_x,\r\n            r = unit(1, \"mm\"),\r\n            gp = gpar(fill = \"blue\"))\r\ngrid.circle(y = prop_bx_coords$top,\r\n            x = prop_bx_coords$left_x,\r\n            r = unit(1, \"mm\"),\r\n            gp = gpar(fill = \"orange\"))\r\n\r\ngrid.circle(y = prop_bx_coords$bottom,\r\n            x = prop_bx_coords$right,\r\n            r = unit(2, \"mm\"),\r\n            gp = gpar(fill = \"red\"))\r\ngrid.circle(y = prop_bx_coords$top,\r\n            x = prop_bx_coords$right,\r\n            r = unit(2, \"mm\"),\r\n            gp = gpar(fill = \"purple\"))\r\ngrid.circle(y = prop_bx_coords$bottom,\r\n            x = prop_bx_coords$left,\r\n            r = unit(2, \"mm\"),\r\n            gp = gpar(fill = \"blue\"))\r\ngrid.circle(y = prop_bx_coords$top,\r\n            x = prop_bx_coords$left,\r\n            r = unit(2, \"mm\"),\r\n            gp = gpar(fill = \"orange\"))<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot.png\" alt=\"\" width=\"693\" height=\"418\" class=\"aligncenter size-full wp-image-2779\" srcset=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot.png 693w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot-300x181.png 300w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot-150x90.png 150w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot-500x302.png 500w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3>\u30dc\u30c3\u30af\u30b9\u306e\u9023\u7d50<\/h3>\n<p>\u77e2\u5370\u3067\u30dc\u30c3\u30af\u30b9\u3092\u3064\u306a\u3050\u305f\u3081\u306b\u3001connectGrob\u95a2\u6570\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001\u4e00\u9023\u306e\u30dc\u30c3\u30af\u30b9\u3092\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306b\u3069\u306e\u3088\u3046\u306b\u4f7f\u7528\u3059\u308b\u304b\u306e\u4f8b\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">grid.newpage()\r\n# Initiate the boxes that we want to connect\r\nside &lt;- boxPropGrob(\"Side\", \"Left\", \"Right\",\r\n                    prop = .3,\r\n                    x = 0, y = .9,\r\n                    bjust = c(0,1))\r\nstart &lt;- boxGrob(\"Top\",\r\n                 x = .6, y = coords(side)$y,\r\n                 box_gp = gpar(fill = \"yellow\"))\r\nbottom &lt;- boxGrob(\"Bottom\",\r\n                  x = .6, y = 0,\r\n                  bjust = \"bottom\")\r\n\r\n\r\nsub_side_left &lt;- boxGrob(\"Left\",\r\n                         x = coords(side)$left_x,\r\n                         y = 0,\r\n                         bjust = \"bottom\")\r\nsub_side_right &lt;- boxGrob(\"Right\",\r\n                          x = coords(side)$right_x,\r\n                          y = 0,\r\n                          bjust = \"bottom\")\r\n\r\nodd &lt;- boxGrob(\"Odd\\nbox\",\r\n               x = coords(side)$right,\r\n               y = .5)\r\n\r\nodd2 &lt;- boxGrob(\"Also odd\",\r\n               x = coords(odd)$right +\r\n                 distance(bottom, odd, type = \"h\", half = TRUE) -\r\n                 unit(2, \"mm\"),\r\n               y = 0,\r\n               bjust = c(1,0))\r\n\r\nexclude &lt;- boxGrob(\"Exclude:\\n - Too sick\\n - Prev. surgery\",\r\n                   x = 1,\r\n                   y = coords(bottom)$top +\r\n                     distance(start, bottom, type = \"v\", half = TRUE),\r\n                   just = \"left\", bjust = \"right\")\r\n\r\n# Connect the boxes and print\/plot them\r\nconnectGrob(start, bottom, \"vertical\")\r\nconnectGrob(start, side, \"horizontal\")\r\nconnectGrob(bottom, odd, \"Z\", \"l\")\r\nconnectGrob(odd, odd2, \"N\", \"l\")\r\nconnectGrob(side, sub_side_left, \"v\", \"l\")\r\nconnectGrob(side, sub_side_right, \"v\", \"r\")\r\nconnectGrob(start, exclude, \"-\",\r\n            lty_gp = gpar(lwd = 2, col = \"darkred\", fill = \"darkred\"))\r\n\r\n# Print the grobs\r\nstart\r\nbottom\r\nside\r\nexclude\r\nsub_side_left\r\nsub_side_right\r\nodd\r\nodd2<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot01.png\" alt=\"\" width=\"693\" height=\"418\" class=\"aligncenter size-full wp-image-2780\" srcset=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot01.png 693w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot01-300x181.png 300w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot01-150x90.png 150w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot01-500x302.png 500w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3>\u6574\u5217<\/h3>\n<p>\u30dc\u30c3\u30af\u30b9\u3092\u6c34\u5e73\u307e\u305f\u306f\u5782\u76f4\u306b\u6574\u5217\u3055\u305b\u305f\u3044\u3053\u3068\u304c\u3088\u304f\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u306b\u3001<strong>alignHorizontal()<\/strong>\u3068<strong>alignVertical()<\/strong>\u3068\u3044\u30462\u3064\u306e\u95a2\u6570\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">align_1 &lt;- boxGrob(\"Align 1\",\r\n                   y = .9,\r\n                   x = 0,\r\n                   bjust = c(0),\r\n                   box_gp = gpar(fill = \"#E6E8EF\"))\r\n\r\nalign_2 &lt;- boxPropGrob(\"Align 2\",\r\n                       \"Placebo\",\r\n                       \"Treatment\",\r\n                       prop = .7,\r\n                       y = .8,\r\n                       x = .5)\r\n\r\nalign_3 &lt;- boxGrob(\"Align 3\\nvertical\\ntext\",\r\n                   y = 1,\r\n                   x = 1,\r\n                   bjust = c(1, 1),\r\n                   box_gp = gpar(fill = \"#E6E8EF\"))\r\n\r\nb1 &lt;- boxGrob(\"B1\",\r\n              y = .3,\r\n              x = .1,\r\n              bjust = c(0))\r\nb2 &lt;- boxGrob(\"B2 with long\\ndescription\",\r\n              y = .6,\r\n              x = .5)\r\nb3 &lt;- boxGrob(\"B3\",\r\n              y = .2,\r\n              x = .8,\r\n              bjust = c(0, 1))\r\n\r\ngrid.newpage()\r\nalign_1\r\nalignHorizontal(reference = align_1,\r\n                b1, b2, b3,\r\n                .position = \"left\")\r\n\r\nalign_2\r\nalignHorizontal(reference = align_2,\r\n                b1, b2, b3,\r\n                .position = \"center\",\r\n                .sub_position = \"left\")\r\nalignHorizontal(reference = align_2,\r\n                b1, b2, b3,\r\n                .position = \"left\",\r\n                .sub_position = \"right\")\r\n\r\nalign_3\r\nalignHorizontal(reference = align_3,\r\n                b1, b2, b3,\r\n                .position = \"right\")<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot02.png\" alt=\"\" width=\"693\" height=\"418\" class=\"aligncenter size-full wp-image-2781\" srcset=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot02.png 693w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot02-300x181.png 300w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot02-150x90.png 150w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot02-500x302.png 500w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/p>\n<p>\u30d0\u30fc\u30c6\u30a3\u30ab\u30eb\u30a2\u30e9\u30a4\u30e1\u30f3\u30c8\u306e\u985e\u4f3c\u4f8b\u3092\u7d39\u4ecb\u3057\u307e\u3059<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">align_1 &lt;- boxGrob(\"Align 1\\nvertical\\ntext\",\r\n                   y = 1,\r\n                   x = 1,\r\n                   bjust = c(1, 1),\r\n                   box_gp = gpar(fill = \"#E6E8EF\"))\r\n\r\nalign_2 &lt;- boxPropGrob(\"Align 2\",\r\n                       \"Placebo\",\r\n                       \"Treatment\",\r\n                       prop = .7,\r\n                       y = .5,\r\n                       x = .6)\r\n\r\nalign_3 &lt;- boxGrob(\"Align 3\",\r\n                   y = 0,\r\n                   x = 0,\r\n                   bjust = c(0, 0),\r\n                   box_gp = gpar(fill = \"#E6E8EF\"))\r\n\r\n\r\nb1 &lt;- boxGrob(\"B1\",\r\n              y = .3,\r\n              x = 0.1,\r\n              bjust = c(0, 0))\r\nb2 &lt;- boxGrob(\"B2 with long\\ndescription\",\r\n              y = .6,\r\n              x = .3)\r\nb3 &lt;- boxGrob(\"B3\",\r\n              y = .2,\r\n              x = .85,\r\n              bjust = c(0, 1))\r\n\r\ngrid.newpage()\r\nalign_1\r\nalignVertical(reference = align_1,\r\n              b1, b2, b3,\r\n              .position = \"top\")\r\n\r\nalign_2\r\nalignVertical(reference = align_2,\r\n              b1, b2, b3,\r\n              .position = \"center\")\r\n\r\nalign_3\r\nalignVertical(reference = align_3,\r\n              b1, b2, b3,\r\n              .position = \"bottom\")<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot03.png\" alt=\"\" width=\"693\" height=\"418\" class=\"aligncenter size-full wp-image-2783\" srcset=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot03.png 693w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot03-300x181.png 300w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot03-150x90.png 150w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot03-500x302.png 500w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3>Spreading<\/h3>\n<p>\u6574\u5217\u3068\u540c\u69d8\u306b\u3001<strong>viewport<\/strong>\u5185\u306e\u5229\u7528\u53ef\u80fd\u306a\u30b9\u30da\u30fc\u30b9\u3092\u3059\u3079\u3066\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u3001\u30b9\u30da\u30fc\u30b9\u5185\u3067\u30dc\u30c3\u30af\u30b9\u3092\u5e83\u3052\u305f\u3044\u3053\u3068\u304c\u3088\u304f\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u3001<strong>spreadHorizontal()<\/strong>\u3068<strong>spreadVertical()<\/strong>\u3067\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<strong>SpreadHorizontal()<\/strong>\u3068<strong>spreadVertical()<\/strong>\u306f\u3001\u30b9\u30d1\u30f3\u5168\u4f53\u306b\u5e83\u3052\u308b\u3053\u3068\u3082\u3001<strong>.to<\/strong>\u3068<strong>.from<\/strong>\u5f15\u6570\u3067\u5b9a\u7fa9\u3055\u308c\u305f\u30b5\u30d6\u30b9\u30d1\u30f3\u306e\u9593\u306b\u5e83\u3052\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">b1 &lt;- boxGrob(\"B1\",\r\n              y = .85,\r\n              x = 0.1,\r\n              bjust = c(0, 0))\r\nb2 &lt;- boxGrob(\"B2\",\r\n              y = .65,\r\n              x = .6)\r\nb3 &lt;- boxGrob(\"B3\",\r\n              y = .45,\r\n              x = .6)\r\nb4 &lt;- boxGrob(\"B4 with long\\ndescription\",\r\n              y = .7,\r\n              x = .8)\r\n\r\nfrom &lt;- boxGrob(\"from\",\r\n                y = .25,\r\n                x = .05,\r\n                box_gp = gpar(fill = \"darkgreen\"),\r\n                txt_gp = gpar(col = \"white\"))\r\nto &lt;- boxGrob(\"to this wide box\",\r\n              y = coords(from)$y,\r\n              x = .95,\r\n              bjust = \"right\",\r\n              box_gp = gpar(fill = \"darkred\"),\r\n              txt_gp = gpar(col = \"white\"))\r\n\r\n\r\ntxtOut &lt;- function(txt, refBx) {\r\n  grid.text(txt, \r\n            x = unit(2, \"mm\"), \r\n            y = coords(refBx)$top + unit(2, \"mm\"), \r\n            just = c(\"left\", \"bottom\"))\r\n  grid.lines(y = coords(refBx)$top + unit(1, \"mm\"),\r\n             gp = gpar(col = \"grey\"))\r\n}\r\ngrid.newpage()\r\ntxtOut(\"Basic\", b1)\r\nalignVertical(reference = b1, \r\n              b1, b2, b3, b4,\r\n              .position = \"top\") %&gt;% \r\n  spreadHorizontal()\r\n\r\ntxtOut(\"From-to\", b2)\r\nalignVertical(reference = b2, \r\n              b1, b2, b3, b4,\r\n              .position = \"top\") %&gt;% \r\n  spreadHorizontal(.from = .2,\r\n                   .to = .7)\r\n\r\ntxtOut(\"From-to with center and reverse the box order\", b3)\r\nalignVertical(reference = b3, \r\n              b1, b2, b3, b4,\r\n              .position = \"top\") %&gt;% \r\n  spreadHorizontal(.from = .7,\r\n                   .to = .2,\r\n                   .type = \"center\")\r\n\r\ntxtOut(\"Between boxes\", from)\r\nfrom\r\nto\r\nalignVertical(reference = from, \r\n              b1, b2, b3, b4,\r\n              .position = \"top\") %&gt;% \r\n  spreadHorizontal(.from = from,\r\n                   .to = to)\r\n\r\n# Now we switch the order and set the type to center the distance between the boxes\r\nbottom_from &lt;- moveBox(from, x = coords(to)$right, y = 0, just = c(1, 0))\r\nbottom_to &lt;- moveBox(to, x = coords(from)$left, y = 0, just = c(0, 0))\r\nbottom_from\r\nbottom_to\r\nalignVertical(reference = bottom_from, \r\n              b1, b2, b3, b4,\r\n              .position = \"bottom\") %&gt;% \r\n  spreadHorizontal(.from = bottom_from,\r\n                   .to = bottom_to,\r\n                   .type = \"center\")<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot05.png\" alt=\"\" width=\"693\" height=\"418\" class=\"aligncenter size-full wp-image-2784\" srcset=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot05.png 693w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot05-300x181.png 300w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot05-150x90.png 150w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot05-500x302.png 500w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/p>\n<p>\u5782\u76f4\u65b9\u5411\u3078\u306e\u5e83\u304c\u308a\u3082\u540c\u3058\u30d1\u30bf\u30fc\u30f3\u3067\u3059<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">b1 &lt;- boxGrob(\"B1\",\r\n              y = .8,\r\n              x = 0.1,\r\n              bjust = c(0, 0))\r\nb2 &lt;- boxGrob(\"B2 with long\\ndescription\",\r\n              y = .5,\r\n              x = .5)\r\nb3 &lt;- boxGrob(\"B3\",\r\n              y = .2,\r\n              x = .8)\r\nb4 &lt;- boxGrob(\"B4\",\r\n              y = .7,\r\n              x = .8)\r\n\r\n\r\ntxtOut &lt;- function(txt, refBx) {\r\n  grid.text(txt, \r\n            x = coords(refBx)$left - unit(2, \"mm\"), \r\n            y = .5, \r\n            just = c(\"center\", \"bottom\"),\r\n            rot = 90)\r\n  grid.lines(x = coords(refBx)$left - unit(1, \"mm\"),\r\n             gp = gpar(col = \"grey\"))\r\n}\r\n\r\ngrid.newpage()\r\ntxtOut(\"Basic\", b1)\r\nalignHorizontal(reference = b1, \r\n                b1, b2, b3, b4,\r\n                .position = \"left\") %&gt;% \r\n  spreadVertical()\r\n\r\ntxtOut(\"From-to\", b2)\r\nalignHorizontal(reference = b2, \r\n                b1, b2, b3, b4,\r\n                .position = \"left\") %&gt;% \r\n  spreadVertical(.from = .2,\r\n                 .to = .7)\r\n\r\ntxtOut(\"From-to with center and reverse the box order\", b3)\r\nalignHorizontal(reference = b3, \r\n                b1, b2, b3, b4,\r\n                .position = \"left\") %&gt;% \r\n  spreadVertical(.from = .7,\r\n                 .to = .2,\r\n                 .type = \"center\")<\/pre>\n<h3><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot06.png\" alt=\"\" width=\"693\" height=\"418\" class=\"aligncenter size-full wp-image-2785\" srcset=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot06.png 693w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot06-300x181.png 300w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot06-150x90.png 150w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot06-500x302.png 500w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/h3>\n<h3>\u30dc\u30c3\u30af\u30b9\u5185\u306e\u6570\u5b66\u5f0f<\/h3>\n<p>R\u5f0f\u3084bquote\u95a2\u6570\u3092\u4f7f\u3063\u3066\u3001\u592a\u5b57\u3084\u659c\u4f53\u306e\u30c6\u30ad\u30b9\u30c8\u3001\u3042\u308b\u3044\u306f\u6570\u5f0f\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u5f0f\u306b\u95a2\u3059\u308b\u3044\u304f\u3064\u304b\u306e\u6ce8\u610f\u70b9<\/p>\n<p>\u8907\u6570\u306e\u8981\u7d20\u3092\u6301\u3064\u5f0f\u306f\u3001<span style=\"text-decoration: underline;\">\u30da\u30fc\u30b9\u30c8\u3092\u4f7f\u3063\u3066\u7d50\u5408<\/span>\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u4f8b\uff1a<strong>expression(paste(beta, &#8220;1&#8221;))<\/strong>\u306f\u03b21\u3092\u751f\u6210\u3057\u307e\u3059\u3002<br \/>\nexpression\u306e\u4e2d\u3067paste\u3092\u4f7f\u7528\u3057\u305f\u5834\u5408\u306e\u52d5\u4f5c\u306f\u3001\u901a\u5e38\u306e<strong>paste0<\/strong>\u306e\u52d5\u4f5c\u306b\u4f3c\u3066\u3044\u307e\u3059\uff08\u4f8b\uff1a\u30bb\u30d1\u30ec\u30fc\u30c8\u30b9\u30da\u30fc\u30b9\u306a\u3057\uff09\u3002<\/p>\n<p>\u30ae\u30ea\u30b7\u30e3\u6587\u5b57\u306f\u5f15\u7528\u7b26\u306e\u5916\u306b\u540d\u524d\u3092\u5165\u529b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4f8b\uff1a<strong>expression(beta)<\/strong>\u306f\u03b2\u306b\u3001<strong>expression(Gamma)<\/strong>\u306f\u0393\u306b\u306a\u308a\u307e\u3059\uff08\u5927\u6587\u5b57\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044)\u3002<br \/>\n\u4e0a\u4ed8\u304d\u6587\u5b57\u306f<strong>expression(x^2)<\/strong>\u3001\u4e0b\u4ed8\u304d\u6587\u5b57\u306f<strong>expression(x[2])<\/strong>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">grid.newpage()\r\n###############\r\n# Expressions #\r\n###############\r\n# Font style\r\nalignVertical(\r\n  reference = 1,\r\n  .position = \"top\",\r\n  boxGrob(expression(bold(\"Bold text\"))),\r\n  boxGrob(expression(italic(\"Italics text\"))),\r\n  boxGrob(expression(paste(\"Mixed: \", italic(\"Italics\"), \" and \", bold(\"bold\"))))) %&gt;% \r\n  spreadHorizontal\r\n\r\n# Math\r\nalignVertical(\r\n  reference = .5,\r\n  boxGrob(expression(paste(\"y = \", beta[0], \" + \", beta[1], X[1], \" + \", beta[2], X[2]^2))),\r\n  boxGrob(expression(sum(n, i == 1, x) %subset% \" \\u211D\")),\r\n  boxGrob(expression(beta ~~ gamma ~~ Gamma))) %&gt;% \r\n  spreadHorizontal\r\n\r\n##########\r\n# Quotes #\r\n##########\r\na = 5\r\nalignVertical(\r\n  reference = 0,\r\n  .position = \"bottom\",\r\n  bquote(alpha == theta[1] * .(a) + ldots) %&gt;% boxGrob,\r\n  paste(\"argument\", sQuote(\"x\"), \"\\nmust be non-zero\") %&gt;% boxGrob) %&gt;% \r\n  spreadHorizontal(.from = .2, .to = .8)<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot07.png\" alt=\"\" width=\"693\" height=\"418\" class=\"aligncenter size-full wp-image-2786\" srcset=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot07.png 693w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot07-300x181.png 300w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot07-150x90.png 150w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/Rplot07-500x302.png 500w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/p>\n<p><span>See the\u00a0<\/span><code>plotmath<\/code><span>\u00a0help file for more details.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u75c7\u4f8b\u7d44\u307f\u5165\u308c\u56f3\u3092R\u3067\u66f8\u3044\u3066\u307f\u307e\u3057\u305f \u6b21\u306e\u56f3\u306f\u300cCONSORT\u58f0\u660e\u300d\u3068\u547c\u3070\u308c\u308b\u3001\u81e8\u5e8a\u8a66\u9a13\u306b\u3064\u3044\u3066\u6b63\u78ba\u306b\u5831\u544a\u3059\u308b\u305f\u3081\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u4e2d\u306b\u3042\u308b\u3001\u75c7\u4f8b\u306e\u7d44\u307f\u5165\u308c\u3092\u8aac\u660e\u3059\u308b\u305f\u3081\u306e\u56f3\u3067\u3059\u3002\u3053\u306e\u30d6\u30ed\u30b0\u306e\u30bf\u30a4\u30c8\u30eb\u3067\u306f\u53d6\u308a\u5408\u3048\u305a\u300c\u75c7\u4f8b\u7d44\u307f&#8230;<\/p>\n","protected":false},"author":1,"featured_media":2674,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-2687","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-miscellaneous"],"jetpack_featured_media_url":"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2021\/09\/7dd4c3f74f006b34bb1d70d7adebd54e.png","jetpack_shortlink":"https:\/\/wp.me\/p9b6zl-Hl","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/plaza.umin.ac.jp\/~OIO\/index.php?rest_route=\/wp\/v2\/posts\/2687","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/plaza.umin.ac.jp\/~OIO\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/plaza.umin.ac.jp\/~OIO\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/plaza.umin.ac.jp\/~OIO\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/plaza.umin.ac.jp\/~OIO\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2687"}],"version-history":[{"count":0,"href":"https:\/\/plaza.umin.ac.jp\/~OIO\/index.php?rest_route=\/wp\/v2\/posts\/2687\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/plaza.umin.ac.jp\/~OIO\/index.php?rest_route=\/wp\/v2\/media\/2674"}],"wp:attachment":[{"href":"https:\/\/plaza.umin.ac.jp\/~OIO\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2687"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/plaza.umin.ac.jp\/~OIO\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2687"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/plaza.umin.ac.jp\/~OIO\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2687"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}