{"id":1741,"date":"2018-09-05T10:16:19","date_gmt":"2018-09-05T09:16:19","guid":{"rendered":"http:\/\/www.meiotic.co.uk\/my\/?p=1741"},"modified":"2019-01-25T16:26:04","modified_gmt":"2019-01-25T16:26:04","slug":"lochs-assynt-using-rmarkdown-tutorials","status":"publish","type":"post","link":"http:\/\/www.meiotic.co.uk\/my\/research\/rmarkdown\/","title":{"rendered":"RMarkdown Fun!"},"content":{"rendered":"<p><script>document.getElementById('menu-item-102').className += \" current-menu-item current_page_item\";<\/script><br \/>\nI recently went to an interesting EdinbR talk on RMarkdown and the workflow available via R Studio and its products. I&#8217;d not used any markdown before but had seen its use in documentation, and this was the little nudge I needed to explore its use myself.<\/p>\n<p>The thing is, it&#8217;s great for documenting your R code as you go (explaining the &#8216;code flow&#8217;), but as soon as I started thinking about how I wanted to use it, I realised I wanted the final output (aka documentation) to be more of a tutorial showing how something is done. And importantly, tutorials don&#8217;t always follow the code flow, but flit in and out of it to explain things in a logical order for the tutorial &#8211; often starting with the output you&#8217;ll achieve by the end (much like a recipe showing a photo of the finished cake at the start).<\/p>\n<div id=\"attachment_1742\" style=\"width: 810px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/meiotic.co.uk\/my\/research\/rmarkdown\/demo\" target=\"_blank\" rel=\"attachment wp-att-1742\"><img aria-describedby=\"caption-attachment-1742\" decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.meiotic.co.uk\/my\/wp-content\/uploads\/2018\/09\/assynt_magnify.jpg\" alt=\"The Lochs of Assynt\" width=\"800\" height=\"532\" class=\"size-full wp-image-1742\" srcset=\"http:\/\/www.meiotic.co.uk\/my\/wp-content\/uploads\/2018\/09\/assynt_magnify.jpg 800w, http:\/\/www.meiotic.co.uk\/my\/wp-content\/uploads\/2018\/09\/assynt_magnify-765x509.jpg 765w, http:\/\/www.meiotic.co.uk\/my\/wp-content\/uploads\/2018\/09\/assynt_magnify-768x511.jpg 768w, http:\/\/www.meiotic.co.uk\/my\/wp-content\/uploads\/2018\/09\/assynt_magnify-750x500.jpg 750w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><p id=\"caption-attachment-1742\" class=\"wp-caption-text\">Leaflet for R can be used to quickly explore spacial data, all documented with RMarkdown<\/p><\/div>\n<h4>Re-jigging the order<\/h4>\n<p>In order to make th<\/p>\n<div class=\"demo\" onClick=\"window.open('\/my\/research\/rmarkdown\/demo');\" onMouseOver=\"this.style.backgroundColor='#E96656';\" onMouseOut=\"this.style.backgroundColor='#56B7E8';\">\n<div style=\"float: left;\"><img decoding=\"async\" style=\"margin-left: 15px; margin-top: 0px; height: 40px;\" src=\"\/my\/wp-content\/uploads\/box_small.png\" alt=\"\" \/><\/div>\n<div style=\"float: left; margin-left: 10px; margin-top: -3px; color: #fff; font-family: 'Open Sans'; font-size: 20px; font-weight: 100;\">View Demo <span style=\"font-size: 24px; color: #fff;\">\u00bb<\/span><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I recently went to an interesting EdinbR talk on RMarkdown and the workflow available via R Studio and its products. I&#8217;d not used any markdown before but had seen its use in documentation, and this<\/p>\n","protected":false},"author":1,"featured_media":1742,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[18],"tags":[113,80,73,112,110,58,111,114],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.7.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>RMarkdown Fun! | *meiotic*<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"RMarkdown Fun! | *meiotic*\" \/>\n<meta property=\"og:description\" content=\"I recently went to an interesting EdinbR talk on RMarkdown and the workflow available via R Studio and its products. I&#8217;d not used any markdown before but had seen its use in documentation, and this\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.meiotic.co.uk\/my\/research\/rmarkdown\/\" \/>\n<meta property=\"og:site_name\" content=\"*meiotic*\" \/>\n<meta property=\"article:published_time\" content=\"2018-09-05T09:16:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-01-25T16:26:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.meiotic.co.uk\/my\/wp-content\/uploads\/2018\/09\/assynt_magnify.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"532\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"meiotic\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ScienceAndMaps\" \/>\n<meta name=\"twitter:site\" content=\"@ScienceAndMaps\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"meiotic\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.meiotic.co.uk\/my\/research\/rmarkdown\/\",\"url\":\"https:\/\/www.meiotic.co.uk\/my\/research\/rmarkdown\/\",\"name\":\"RMarkdown Fun! | *meiotic*\",\"isPartOf\":{\"@id\":\"http:\/\/www.meiotic.co.uk\/my\/#website\"},\"datePublished\":\"2018-09-05T09:16:19+00:00\",\"dateModified\":\"2019-01-25T16:26:04+00:00\",\"author\":{\"@id\":\"http:\/\/www.meiotic.co.uk\/my\/#\/schema\/person\/1995e1cecd67d2ff1e6a638aa331d032\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.meiotic.co.uk\/my\/research\/rmarkdown\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.meiotic.co.uk\/my\/research\/rmarkdown\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.meiotic.co.uk\/my\/research\/rmarkdown\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.meiotic.co.uk\/my\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"RMarkdown Fun!\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.meiotic.co.uk\/my\/#website\",\"url\":\"http:\/\/www.meiotic.co.uk\/my\/\",\"name\":\"*meiotic*\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.meiotic.co.uk\/my\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"http:\/\/www.meiotic.co.uk\/my\/#\/schema\/person\/1995e1cecd67d2ff1e6a638aa331d032\",\"name\":\"meiotic\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"http:\/\/www.meiotic.co.uk\/my\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/0.gravatar.com\/avatar\/cacd48b532259fb621d7acf4cc462290?s=96&d=retro&r=r\",\"contentUrl\":\"http:\/\/0.gravatar.com\/avatar\/cacd48b532259fb621d7acf4cc462290?s=96&d=retro&r=r\",\"caption\":\"meiotic\"},\"sameAs\":[\"http:\/\/meiotic.co.uk\",\"https:\/\/twitter.com\/ScienceAndMaps\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"RMarkdown Fun! | *meiotic*","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_GB","og_type":"article","og_title":"RMarkdown Fun! | *meiotic*","og_description":"I recently went to an interesting EdinbR talk on RMarkdown and the workflow available via R Studio and its products. I&#8217;d not used any markdown before but had seen its use in documentation, and this","og_url":"https:\/\/www.meiotic.co.uk\/my\/research\/rmarkdown\/","og_site_name":"*meiotic*","article_published_time":"2018-09-05T09:16:19+00:00","article_modified_time":"2019-01-25T16:26:04+00:00","og_image":[{"width":800,"height":532,"url":"https:\/\/www.meiotic.co.uk\/my\/wp-content\/uploads\/2018\/09\/assynt_magnify.jpg","type":"image\/jpeg"}],"author":"meiotic","twitter_card":"summary_large_image","twitter_creator":"@ScienceAndMaps","twitter_site":"@ScienceAndMaps","twitter_misc":{"Written by":"meiotic","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.meiotic.co.uk\/my\/research\/rmarkdown\/","url":"https:\/\/www.meiotic.co.uk\/my\/research\/rmarkdown\/","name":"RMarkdown Fun! | *meiotic*","isPartOf":{"@id":"http:\/\/www.meiotic.co.uk\/my\/#website"},"datePublished":"2018-09-05T09:16:19+00:00","dateModified":"2019-01-25T16:26:04+00:00","author":{"@id":"http:\/\/www.meiotic.co.uk\/my\/#\/schema\/person\/1995e1cecd67d2ff1e6a638aa331d032"},"breadcrumb":{"@id":"https:\/\/www.meiotic.co.uk\/my\/research\/rmarkdown\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.meiotic.co.uk\/my\/research\/rmarkdown\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.meiotic.co.uk\/my\/research\/rmarkdown\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.meiotic.co.uk\/my\/"},{"@type":"ListItem","position":2,"name":"RMarkdown Fun!"}]},{"@type":"WebSite","@id":"http:\/\/www.meiotic.co.uk\/my\/#website","url":"http:\/\/www.meiotic.co.uk\/my\/","name":"*meiotic*","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.meiotic.co.uk\/my\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Person","@id":"http:\/\/www.meiotic.co.uk\/my\/#\/schema\/person\/1995e1cecd67d2ff1e6a638aa331d032","name":"meiotic","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"http:\/\/www.meiotic.co.uk\/my\/#\/schema\/person\/image\/","url":"http:\/\/0.gravatar.com\/avatar\/cacd48b532259fb621d7acf4cc462290?s=96&d=retro&r=r","contentUrl":"http:\/\/0.gravatar.com\/avatar\/cacd48b532259fb621d7acf4cc462290?s=96&d=retro&r=r","caption":"meiotic"},"sameAs":["http:\/\/meiotic.co.uk","https:\/\/twitter.com\/ScienceAndMaps"]}]}},"_links":{"self":[{"href":"http:\/\/www.meiotic.co.uk\/my\/wp-json\/wp\/v2\/posts\/1741"}],"collection":[{"href":"http:\/\/www.meiotic.co.uk\/my\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.meiotic.co.uk\/my\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.meiotic.co.uk\/my\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.meiotic.co.uk\/my\/wp-json\/wp\/v2\/comments?post=1741"}],"version-history":[{"count":10,"href":"http:\/\/www.meiotic.co.uk\/my\/wp-json\/wp\/v2\/posts\/1741\/revisions"}],"predecessor-version":[{"id":1777,"href":"http:\/\/www.meiotic.co.uk\/my\/wp-json\/wp\/v2\/posts\/1741\/revisions\/1777"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.meiotic.co.uk\/my\/wp-json\/wp\/v2\/media\/1742"}],"wp:attachment":[{"href":"http:\/\/www.meiotic.co.uk\/my\/wp-json\/wp\/v2\/media?parent=1741"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.meiotic.co.uk\/my\/wp-json\/wp\/v2\/categories?post=1741"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.meiotic.co.uk\/my\/wp-json\/wp\/v2\/tags?post=1741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}