 So, I was going to, and I still will do a little slide presentation on our markdown, but we're going to work off of this site in blue. There's another URL at the top over there in blue, rfund.library.duke.edu slash rmarkdown. You might want to load that just to make sure we're all on the same page. Curiously, how many folks here have used rmarkdown at all? So, all right, and some of you haven't. Great. All right, so I'm going to do a little slide presentation where we're going to talk a little bit about the what and the how, and then about halfway through I'll try and sort of reinforce that with a little bit of why rmarkdown, and then we're going to just break into a series of exercises, and it's sort of like a build your own adventure kind of exercise set. The first two are pretty prescriptive, and then the third one, you literally, you can sort of choose. Do you want to build a website? Do you want to make a, just a standard R notebook? Do you want to create a book, whatever you want to do? But I will tell you that, oh, it's only marked this kind of effect. It might affect some of the others, and I'll point that out in a minute, because you could actually download and install something while I'm talking. But my name is John Little. I'm glad you're here. I am on staff of the Data Visualization Services Department, which we have a lab, so this particular workshop is part of the focus that we have, we have a focus on various aspects of R that we call RFUN, and there's a website, rfund.library.duke.edu, which is an easier way to get to the R resources that we train on. And so let's just jump right in. So markdown is actually a markup language, and examples of markup languages are HTML, a markup language, or SGML, which if you're lucky, you've never had to deal with. But HTML is actually a subset of SGML. XML is a subset of SGML. R markdown and markdown are not subsets of that at all, and they came into the world because these markup languages can be hard to learn and even harder to read, right? They're all designed to mark up your text, and then you run it through a rendering machine, and it transforms into something else. But if you're stuck without the rendering machine, you're looking at all this marked up text, and all of these angled bracket marked up text can be very difficult to read. The advantage to markdown is that it's very simple to learn, and you can actually read it without the rendering machine. So we'll talk a little bit about that in a minute. But basically what you're marking up is document structure, and to a certain degree, you can mark up citations, because we'll get into this in a minute, but everything that you mark up can then be transformed into something else. And the little blue sidebar is an example of some of the things that you can transform your markup into. The ones in yellow are some of the ones that we'll potentially talk about today or that you'll do an exercise on, but there's a whole list of them. I'm sure that's not an exhaustive list. You'll see why we would do that in a minute. Another aspect of markdown, which is really useful, is that it basically allows you to realize this concept called literate coding, all right? And literate coding, you can look it up on Wikipedia if you want a really full feature, discussion of it, but the basic idea is that you're going to intermingle your pros with your analysis. So in our context, you're making regressions or you're creating plots or whatever, and you want to be able to explain, you know, how did I transform the data? Why did I transform the data? What special tricks did I use? What special packages did I use? The degree that you want to document that often depends on your audience, right? So if you have a very technical audience, you may actually want to say things like I'm using the ggplot library. If you're speaking to an executive of some sort, there's an executive summary, they probably don't care exactly what kind of analysis you created, but they want some of the output, some of the tables, things like that. Now, the thing that's nice about our markdown is once you generate all of that literate code, intermingling your pros with what are called code chunks, up in the top there's a little header which defines your output. And so you can generate multiple derivatives depending on your audience. You don't have to change your analysis at all. A real advantage of that is that your outputs can be dynamically generated based on your data set, and if your data set is changing, you don't have to rewrite your code. You don't have to do all these things where you do your analysis in one spot and then you copy the outputs and then you move them over to your final documents, and all of that copy-paste move is both an opportunity to make typographical errors or make mistakes, as well as it obscures the process of your research, right? So this allows you to be a little more transparent, it allows you to be more predictable, allows it to be more reproducible. All very, very positive aspects, certainly one of the reasons why I'm interested in it. Another nice aspect of particularly our markdown is that you can intermingle multiple kinds of code. So I'll show you that in a minute, but two of the most popular coding languages that I'm aware of, Python and R, Python probably more popular than R, but either way, you can intermingle both of those in the same document. You just change how you identify the code chunk. So we can talk about it a little bit more if that's of interest to you. So anyway, like I said, render in many formats. So whereas a picture is worth a thousand words, I stole this picture from the R studio site and you'll see that the circle of icons around the letter R just visually depict the kinds of documents that you could generate from one single R markdown document, including books, including pre-formatted web articles, or not web articles, but articles, if the publisher that you're aiming at has an R markdown template and some do. I know Elsevier does have some. A lot of our statistical journals obviously do, but if you had your own, you could generate these templates as well. It's all part of our markdown. What's really nice to me is not only can you generate static documents like Word files and PDF files, but you can generate a lot of web resources as well, which have a greater capability for interactivity. Now, there's two things I forgot to mention. Going back to the idea that your document can be dynamically generated, not only do you have code chunks where you're generating sort of maybe more complex code, but you can also do what's called inline coding where right in the middle of your pros, maybe you want to say, you know, I had X number of observations in my data set and maybe your data set changes. Well, right in the middle of that code, rather than saying X number and always updating it, that can just be part of an R analysis, right? So for example, length of a data frame might give you the total number of observations. We'll practice some of that in a minute. It seems like there was something else I wanted to tell you. We'll probably come back to me in a minute. But in any case, this is like, this is the bulk of our markdown. If you haven't seen it before, I always claim like you can actually understand our markdown in about 20 to 30 seconds and you can memorize it in about a minute, right? There's a little bit more to it, but, you know, 80% of it has to do with just providing structure to your document. And so what you'll see on the left is the actual markdown or the marked-up text. And what you'll see on the right is how it's rendered, right? So in other words, if you proceed in a line with two hashtags, it could get rendered as a large subheading. If it was preceded with one hashtag, it would be the largest subheading. And you can go down the list. Now, the rendering, depending on your output style, there's often a canned rendered style, right, which you can change. And that way to change that is with cascading stylesheets or CSS, which you don't have to learn. But if you're interested in, for example, this is rendered in this slide deck. By the way, the slide deck was all created in our markdown. But this slide deck, it's the second level heading, is rendered in blue in a particular kind of font. And you probably can't see it, but there's even a little, there's a little shadow yellow around the letters. If you didn't like that, you don't have to worry about it because in most cases, the rendering is just more plain, right? Black on white, a larger size. But the point is, is that while when you render your markdown document, a base style will usually be chosen. But if you don't like that style, you can change it, right? So you see examples of two different sizes of subheadings. You see here, italicized bold and monospaced. It's very simple, italicized as always bracketed in asterisks, bold is bracketed in double asterisks. Monospace, if you needed to do that, is backticks, what we call backticks. If you're creating links which are easy to generate even in the most static of documents like Word files and PDF files, a link is really just the link word itself in square brackets followed by the URL, right? So if I clicked on that word link, in theory, it should go to example.com. But in practice, I actually made it go to Google. So this code is not completely correct, but you get the idea. Bolded lists, numbered lists, citations, if you're working with citations, can be really handy. I don't have a lot of examples of those. But depending on your flavor of markdown and the rendering tool that you're using, it will automatically number the citation so you don't have to keep up with the number. You can also integrate it with this thing called bibtext. If anybody uses that, so you can create your own database of citations and pull them in with very small bits of our markdown. Down here at the bottom are two further resources that you can use to learn more about this flavor of markdown. Mark has a question. Shouldn't the word text attribute to be on the right? Where do you see the text? It says italic bold on a space. Yes, it absolutely should. I just wanted to make sure I wasn't missing something. I'm glad you asked that question because I don't want it to be confusing, but I was just trying to, yeah. But it reminded, something that maybe I said reminded me of one other point that I wanted to make, which is that there are lots of flavors of markdown. They're all 90% the same. Since this is a workshop on R, I'm assuming that most of you are using R, and the R markdown flavor seems to be, in my opinion, the most convenient for sort of academic work, like managing citations and integrating your R code and things like that. But things like, the standard is not fully formed. So things like citation management can differ. Like for example, if you were writing markdown in a Python IDE, it may not have exactly the same syntax. It's really not that big of a deal. But you should at least be aware. I mentioned this a minute ago, but most markdown documents have something at the top called a YAML header. YAML stands for YAML, Ain't Markup Language. And there's really only one, so a whole YAML header at the top exists between those beginning three dashes and then ending three dashes. And technically, you really don't need a YAML header, right? The YAML header is a way to assign some metadata which will get rendered according to some set of rules. So the title would be large and centered, for example, and that would be authored. You can actually put R code in the date field so that the date is always dynamic, things like that. But the one thing that generally is absolutely necessary is the output style. So where I mentioned that you can generate all kinds of different outputs, here in the YAML header is where you're going to want to identify the output style that you want. You can even leave the output style off, but then you're not going to render anything, okay? You still have an R markdown document, and it'll still be easy to read 20 years from now. But it won't render any of the derivatives, which is one of the main reasons why we do this. So I put these resources here in the middle of this slideshow because I just want to kind of point out, once again, if you need to know a lot about R markdown, this Defendant Guidebook is online and free. There are some cheat sheets, but also this gallery I think is kind of nice because it gives you an idea, another idea, a little sort of visual idea of the different kinds of things that you can do in R markdown. So you'll see in like HTML documents, PDF documents, interactive documents including Shiny, dashboards, which are really pretty cool, all that kind of stuff. You can look at that at some other time. So I mentioned that we talked a little bit about what and why or what and how, but I want to just briefly kind of go over the why. Aside from the idea that it's easy to mark up and easy to read and it's easy to render different derivatives, the real reason I think why you want to approach a literate code style of generating output is that it's simply more sustainable. It's plain text, doesn't require a very complicated rendering tool, and even if you don't have the rendering tool, you can still read it. So anybody who's been around a while, and I know this gentleman here on the right told me he'd been around, or on, and it doesn't matter which side, told me he'd been around a while, as I've been around a while. Actually remember writing documents, you know, 25 years ago that sometimes they just don't transfer over, right, so you can no longer see what you were writing unless you had the paper copy or whatever the derivative was. And something like this, whether or not you can derive it into something else is a good question. Time usually makes those things difficult, but you always have source code and source pros that you can actually read and you could look back at it and see what had actually been done there. If you wanted to read more about that kind of thing, there's a really interesting website called The Programming Historian and they can sort of cover that. In greater detail. So what I'd like to do at this point, I have three sets of exercises. If you're not on the screen, let me just recommend that you get here. rfund.library.duke.edu slash rmarkdown, that's this URL. And then the very first link, we're going to start, you might want to have two windows open or two tabs open. Have this tab open and then also right click on this and open up this slideshow. In a separate tab and that will take you here. And round about slide 10 will be exercise one. So what I'd like to do, I'm going to try and introduce the exercises. I really like to get you working so that you have some notes on how these things work. And you can take them back with you. Yeah, let me cover that. Let me just cover the instructions first and then those of you who are working on, I think May, are you working on your own laptop or on? I mean, do you? No, no, no, it's fine, whatever you want to do. But these machines need a little patch, which runs in no time at all. So for exercise one, and I will run through this just so that we all do it together. But all I'm going to suggest is that you open up in our notebook file, right? And the way you would do that if you're in R, you're going to click on this little icon in the upper left and there it is right there. It says R Notebook. If you haven't done this before, R might prompt you to install some package like Knitter or something like that. And that's going to be fine. Go ahead and do that. And what you'll see in this R Notebook file is an explanation of literate code, how you open an R Notebook file, how you open a code chunk, which is this thing right here, right? It tells you right here that you can press this keystroke command or as it turns out, it's really just text. You could type it in or just note that up here, there's a little button there that says Insert. And you can insert more R code chunks or Python code chunks or SQL, whatever you want to do. And when you click Insert, it gives you another, an empty code chunk where you can type any kind of R command that you want. Now, my typical practice when I'm working in notebooks is to delete all of this because it's really just to jog your memory. I wouldn't recommend that you delete it today because you're still learning. But there's nothing there that is necessary to memorize and it's certainly probably not, imagine that you have a target audience for a report that you're writing. It's probably not your target audience to tell them these things. This is for you to learn how to write the R markdown. You can add other things up here in the YAML header, but for right now, all you really want to do is just to either practice making some things bold or italicized or whatever. If you want to practice some unordered list or some tables or some block quotes, all of these links should take you to examples of what those are. And so all I want you to do right now is play with it and then we'll come back to it. Now, I still want to give the rest of the folks and everybody else a chance to just sort of play around. And then I hope that that will generate some questions. And I'll, let's see, now I will also mention that if you're on this site, not on the slides and you click on our notebook, there's some more instructions that are a little more visual and descriptive than the instructions I put in the slide. So you could, if things are confusing, you could try and follow those. Okay, so now that you've struggled with that, hopefully not too much, let's just do it again and see if you have any questions. So what I was recommending was that we just practice a little bit with the markdown. I'm going to take some of this text out and I'm going to change the title to Hello World, R Markdown. And I'm going to give it an author name, John Little. And I'm going to give it a date. And here's where you can actually insert R code, which is, hopefully I'm going to do this right, R sys date. Sometimes I get this syntax wrong here. I think I might have to put the whole thing inside of quotes, right? So then the output style is an HTML notebook. And I'm going to put in a second level heading, or actually, yeah, second level heading. I already got Hello World. I'm going to say, example rows. This is my first R mark, oops, R markdown document. And I want to make first bold and then I'm going to say lists. And I'm going to put in favorite fruit, fruits, apple, grapes. All right, that's enough for the moment. The next thing, and several of you discovered this, you really have to save it to render it. But since it's an R notebook, you can just actually go straight to preview and it will prompt you to save it. And this is how you render it by clicking this. This button changes. In every other context, it will say knit, but in an R notebook, it will say preview, right? But if you just click on it, it will pop up a dialog box where you can give your file a name. And I'm going to call it first notebook. And at least on a Windows context, you'll automatically assign a file extension.rmd for R markdown. And that will show up if you look over here in your file menu. I'm going to minimize the output here for a second. If you look over here in the files tab, there's my R notebook right there with my R markdown. And this is the derived notebook that gets derived from this line right here, output HTML notebook, right? So RStudio will automatically pop up a web browser that I can see. And you can see what's been rendered, everything from the date. In my case, the date got rendered, the title, the first level heading, the second level headings, the bold, all of that got rendered. None of the code in my case got rendered yet because I actually hadn't run it, right? I had put the code chunks in there but I hadn't run it. So I could re-render this. I could go over here and I could click run all. Or I could run these code chunks one at a time simply by clicking on these little green triangles. So if I click that plot, I get a plot. And if I click this tidyverse, so here's something that's interesting that's happening is I'm loading the tidyverse and I'm getting some response from R. But let's imagine that my audience here is the library director who doesn't care about R, right? So I don't really, I mean, I might tell her that I might do something like this instead. I might say data were transformed using tidyverse packages specifically to Plier. So there's my pros. And then I actually want to load it but maybe I don't want it to show up. So I'm going to go over here and I'm going to invoke some of these code chunk options, right? And some of the code chunk options I have, for example, are show nothing run code which puts this in include false. But it means that it will run. And then I can close this so that next time it runs, it doesn't show up. And so now if I just do this all again, I say run all just to make sure the whole thing runs, which is, by the way, another technique to make sure you're writing reproducible code, right? You might, one of the things that happens a lot in R is you'll go into, you've written all the code that you want, it's just the way you want. It's a good idea to go up to, where is it? Session, yeah, sessions, restart R so that you kind of clear out, you start from scratch and then you run everything again. And if your code all runs, you have a real high degree of confidence that you've written some reproducible code and you could just send that .RMD file to anybody and if they have the same packages and the same RStudio, it's going to run. If they don't have the same packages in the RStudio, you could actually then send them rather than the RMD file, send them the notebook file, right? So let's take a look at that. I'm going to render this again by clicking preview. Can I just ask you a quick question? Yes, sir, please. The sys date in the beginning, how did you get that to render as the code and not just this? So that's an example of inline code and because date has to be inside, up in a YAML heading, date has to be inside double quotes so I could actually put in the word today, which is an oddly big date, right? But I could also put in 2018, whatever today is, 10.02 or I can put in this inline code which exists within back ticks and I can repeat that, right? I can for whatever reason, let's, maybe I don't want it up there or maybe I want to repeat it. Today, this fine day of, and I put my little back ticks in there and I write my R code in front of it, seed my R code by the letter R to say I'm going to run some code and then this is actually, it turns out to be R code, sys.date is a function. If I control enter right there, it'll tell me what that render is but, you know, you're doing it, if you're even close, you can, you know, you can put this down in the console, sys.date and now you know what you're getting, right? So for example, if I typed in length, cars is an onboard R database data set and I wanted to see how many observations are worded in the speed column, down here, I could do that up here as well. So here's the plot of cars but I might start out by saying cars data set and say the cars data set has back tick length, oops, I forgot something, observations, right? And if I wanted to make sure I knew what that was actually doing, again, I could put my cursor in there and control enter and I can get the response. So now if I preview this one more time, that inline code shows up there, it shows up there, of course that. Does that answer your question well enough? Yeah, it's just, I think so. Thank you. I'm happy to, you know, give you more information. I think it's just because my keyboard layout is different so I don't really make the right kind of... So there's a difference between a back tick and a single quote. Yeah, I think that's... And yeah, keyboards can matter. On my keyboard, the single quote is near the enter key below the double quote, it's uppercase, lowercase key. And the back tick is to the left of the number one and it is the lowercase of the tilde. But every keyboard can really differ. Right, another thing to point out is this is just a regular old nothing special file at this point. Even if I had images in here, and to a certain degree, this plot is an image. It's now all contained in this one R notebook. So going back to my audience, if my audience is less, is more technical, I might want to send them the .RND file but if they're less technical, I could just send them this .MB which stands for notebook.html file and they don't have to have any R set up at all. So I'm going to open up my file browser here and click on, see if I can find where that is. Yeah, here it is right here, firstnotebook.MB. I can email that to somebody just like I would email a word file. If you view the source on that, I don't know what degree you folks are interested in HTML but if you view the source on it, it probably will look pretty ugly because it's full of a bunch of stuff that makes it a self-contained document, right? But down at the bottom is the actual rendered prose. No questions? I just don't know what I'm looking at. Yeah, you don't actually have to know but I try not to get too down in the depths about HTML but what you're looking at right here is the source of an HTML document. All of those letters and numbers, what are they doing for it? So in an HTML document you can have all of this marked up text as well as the code but you can also have images, right? I wish I had an example image. To a certain degree, this is an example image. Yeah, it's an image because I can do save images and so what it's doing is it's bundling that image, the raw bits of that image up into the HTML document so that when you send it, somebody doesn't need any special programs to see it on their computer, right? All they need is a web browser. Sort of like if you send somebody a heavily edited Microsoft Word document that has images in it, they don't need anything special, they just double click, open the document and there's a whole bunch of stuff in the background that you never see. There are some fudsy elements of R Markdown that I didn't cover and one of them is that blank lines mean something, right? So if you have a second line heading and I actually don't have it memorized everywhere it works but if you have the second line heading, you don't want to put something immediately below it, you want to put a blank line and then put your text. Would you even put a space there? Oh, that's not really an example like this. Just sort of following that. And you don't have space after the line bullet list. So you're finding something that I need to fix for version two of this workshop because I didn't realize that that was the case. Yeah, just sort of copying that. Yeah, thank you. That's really important. The takeaway is if it's not rendered quite the way you want, try putting in a blank line in between. I mean, it really will work a lot of the time. Can I ask, is that mono space just because it's actually like, it's in line code? No, so it's the same markers but since it's not preceded with the letter R, it's not actually code. But what it's used for a lot of times is for communicating code, right? Because code is a little bit easier to read for some reason when it's mono spaced. All right. So what I would recommend now, let me just briefly talk about this. I don't think you need to do this but there's a difference between an R notebook and an HTML document. It's not a huge difference and it gets kind of technical but the second example under this on the website is how to generate an HTML document. The output will look exactly the same or mostly the same but the difference is in how the rendering engine and the R code processor will process your code. So it's a very rough rule of thumb. You would use an R notebook in your development stage and when you get to the point where you're like, okay, this is perfect. I kind of want to publish it. You might switch to an HTML document. You don't have to. I probably used our notebooks for two years before I realized that that was the case. But if you follow that rule of thumb, it will make your efforts at writing reproducible code more simple or more effective. Because what's happening is when you hit knit or when you hit preview, depending on whether or not it's an R notebook, an HTML document or an R notebook, or what's the other one called? I've forgotten the wording on it already. HTML notebook or an HTML document. Depending on which one you've chosen, when you hit render, it will start an entirely new R process or it will keep an existing R process. Those are kind of minor details, but I know that I wondered for a while why I would have one versus the other. And I find that the HTML notebooks are a little bit quicker to market whatever process you're doing. Not necessarily that they process quicker, but you don't have to wait as long to render the output. So for exercise two, unless we have other questions, and just so you know, by the time we get to exercise three, the basic drill for exercise three is pick any one of these examples other than the cheat sheet and one that's relevant to you and see if you can make one. There are some caveats for PDF and book that I'll describe in a minute, but actually maybe I'll describe those caveats now. If you think you want to practice today making a PDF notebook or a book, you probably need a LaTeX engine. Now, I am not a LaTeX user, so my description of LaTeX is going to be horrible. But the good thing is if you use our notebooks and our markdown, you don't also have to generate LaTeX documents. You can put your LaTeX right into the R markdown. And it's generally useful for generating equations. But it's also useful for generating PDF documents and this particular book editor. So Mac users oftentimes have a LaTeX engine already configured into their computer and they don't have to do anything special. And the Windows user is really up until about like just a couple months ago. You had to go through this really painful install process. And the guy who developed this greatly simplified it. You would just run those two commands in your console, in your R studio. You can do it on these machines or on your machine. It will take about five minutes. So that's what I'm telling you now. If you think you want to practice that feel free to install those things now in the console. If you run through this process and it's not working with LaTeX feel free to come see me particularly in the walk-in hours. And I'll be happy to help you troubleshoot. But going on to exercise two, I did some of this in the explanation. I generated a code chunk. That's what I want you to do now is practice either making a code chunk or some other inline code. Practice changing your chunk options. You'll see right here in the LaTeX equations that as long as you bind everything in your equation by dollar signs. So here's an example of a LaTeX equation. And if you click on this link or this link will take you to more information about any of these. You can see some examples of what equations look like, so let's just go ahead and do that now. All of this stuff got generated... I'm not sure how. All of this stuff got generated by this code. It's all within... If it's a multi-line LaTeX it's double dollar signs. Most of that means nothing to me. So I can tell you how to simply do it but I can't help you troubleshoot LaTeX. And not everybody's interested in LaTeX. So since this is not a workshop on LaTeX we're just going to kind of gloss over that. But if it's of interest to you you might want to practice that. And you might want to practice playing with your YAML headers. Did you have a question? I didn't want to go through LaTeX but I just have one question. Do you have to load TinyTech, for example, as a library? So all you have to do is you have to... No, you don't have to load it as a library. You just have to install it. I'm not sure why you don't have to because it would seem like you would. But the guy who sort of generates almost all of this stuff he wrote the stuff behind our notebooks he wrote the stuff behind our markdown he wrote the stuff behind bookdown and the stuff behind blogdown. He wrote this little LaTeX engine and he's just really into simplifying life for the rest of us. He should get some kind of prize. I once heard him give a talk and he claimed that he only eats because he can't eat code. So he's literally just coding all the time and doing stuff just because he's really into it and it really is a great benefit for the rest of us. Simplifies things. So back to exercise two I would go either if you want to try make an HTML document if you want or stick right within your HTML notebook and try a little bit more of these advanced things. Note that one of the things to try in the code chunk like right here is that when you click on code chunk on the settings you can actually check off this thing where it says use custom figure size and you can play with changing your figure size in the rendered output. It's the easiest way to change your figure size in the rendered output. So let's take about five minutes at least on that and then we'll get to exercise three. Explain again the difference in HTML document and notebook. It's confusing because the output is essentially the same. It's a web page. Which you can send to anybody. An HTML notebook is a little bit quicker to development. It naturally generates a self-contained file where you don't have to send any images or anything like that. It goes through a different R processing engine so it's a little bit easier to make a reproducibility mistake. So the advice that I've read by this guy, Yui is that you would use the HTML notebook for your development phases and you're at this point where you're like I'm really not going to change this much anymore. You might switch over to the HTML document mode at that point. It'll take a little longer to render and it also gives you the option to not generate it as a self-contained document. The reason why you might want to do that is that it will put images and things like that in separate folders which means when you mount them on the web it means that your target audience's remote browser will have a better option of caching which means that there's a quicker read time. Right? So exercise 3 is more the same but in this case let's you can look at these instructions here basically it's just pick and some of you are already doing this pick something else that you want to try and create the website and the book are going to be the most involved and the instructions will get you started only at least one student in here was already trying the website forget who let me just note that there's really good in-depth instructions on the website the guy who developed this said it kind of boils down to if you know nothing about html you can generate a website in about 10 minutes but if you know something about html it could take you days and that's because you want to start customizing way beyond what is simple to do it's definitely been my experience as well so it's really nice to know I've generated more than one web page out of it in fact the R fun site is generated out of book down it's called blog down and I'm happy to help troubleshoot once you generate the website you still have to move it up to a web engine of some sort and there's some very simple ways to hook that up to your github account so that every time you push the site will get regenerated it's really nice and really smooth but it will take a little bit more effort than just sharing an html file oh and the dashboards are really cool too I should I don't have any code for you but the dashboards are so a dashboard is this let me just go straight to it is the idea that you're putting everything that you've got let's go down here to flex dashboard I'm going to click on this link and find the gallery so that's the easiest way to examples so this is a this is a dashboard it's got a pane on the right and a pane on the left and it allows people to one of the functions that people use this for I like it for its web presence it allows you to synthesize all of your documents into different panes and it can be interactive but one of the things people use this for is they use it for generating posters for poster sessions because you can blow them up and it's sort of the same issue and what you would typically do in an 8.5 by 11 static page and so it allows you to generate the panes it has some widgets where you can generate these little gauges see if I can find one, components you can have gauges right here gauges and value boxes that can be dynamically generated to represent different things very visual but designed to simplify and be attractive but in a relatively compact space so you're not using a lot of pros in this case it's still the same R Markdown method but you're trying to tell your story more with charts and visualizations anybody here is a Tableau user and you may know that Tableau easily generates dashboards this is an alternative to Tableau dashboards which arguably is a more reproducible way to go but I'm not trying to not trying, you can take that with you if you want not trying to sell Tableau or dashboards just so happens that it's sort of like choosing an ecosystem and you get into R it's nice to know that R does a lot of stuff and you don't have to go outside of it if you don't want to but it can but it can be configured to work with Jekyll or a couple others Netlify yeah it's exactly the same nothing different and you mentioned that some people use that I mean just amend what I said, nothing different the nice thing about blog down is that it allows you to use R Markdown in your blog posts in the Hugo site whereas the rest of Hugo a standard Hugo would only use Markdown so if you want to generate R code it's a good way to go so anyway, flex dashboards yeah yeah if you go to using actually home and using will sort of help you devise initial dashboards and mostly you probably initially want to start with components and just practice with gauges and value boxes and then you'll see example code all throughout so you can get a sense of what you're doing and it will do the same thing as an HTML document when you click knit to render it it will generate an HTML page so if I want to make posters use the dashboards basically what I would do is to put different figures of different texts together and then I can like export a PDF file yeah there's one helper library that I have seen used and I can look it up, I don't actually know it but there's a helper R library that will turn a flex dashboard into a printable poster and I, you can probably Google it, but if you don't find it let me know you're working? no, what are you trying to do? when you say publish tapes or like someone that you can transfer directly into your manuscript file right so any data frame that you have in R? yeah maybe it's more of an R thing how to make tables that are of multiple different variables and measures but if you need a baseline table for instance, you should both have for instance 6 and H which is a frequency with a percentage and a median and maybe for two different groups and then you'd like it to be done so do you have anything online just describing how to I don't although if I'm understanding you I think the main goal, my guess would be I'm not sure I'm understanding you completely all you need to do is make sure that it's a data frame that R so you set it up as a data frame line by line what you want to have that data frame needed at the end you can certainly do it line by line how do you generate that data frame there's lots of different ways but then once you have it in a data frame then you can publish it very simply so the trick there is that if you're publishing a web it's like html notebooks or html documents or web pages or flex dashboards you can print those tables print those tables in what's called a page fashion which means they'll show 10 rows at a time but if you want to have more control you can change the options of that page when you get to things like pdf and word files that interactive page feature doesn't work and then you have to switch to something called cable which is part of midder and there is an exhaustive and then cable has a whole set of extra features so there's a really long list of how to manipulate your html tables or your static tables with cable now there's a simpler way to present a table in our markdown but you usually don't use it for about three or four rows and I mean I can show you what it looks like it's really it's crazy simple so for example if I have let me go down here and say let me just move this up I don't know how well you can see this but example table and I'm going to say root quantity and then I'm going to do this say apple three pair two now when I render that I get this so that's the absolute simplest way to generate a table but it has that's markdown cable is a way to generate data frames into different rendered outputs but this is just raw it has limited customization because being our markdown it doesn't want to get too sophisticated address a little more this hugo and block down how does that actually use for a block so it's interesting that it's called block down so hugo is something called a static website generator and that means that using something like our markdown you can generate a whole website without ever learning html but then you still have to have a way to serve that website that's a different thing but it's simple to do with this free tool called netlify which can literally drag your whole website your static website generated let's say it's on a folder you can drag that folder up to netlify and they'll serve it for free it's a cloud service now there's some competitors to hugo that do the same thing the most popular which is called Jekyll J-E-K-Y-L I think is how it's spelled hugo is really nice because it's super quick but both of them do essentially the same thing now what Yui did is he took hugo and he put an r markdown wrapper on that and he called it blog down because his working assumption was that what people really want to do is they want to blog so the about page and the contact us page and the office hours page those are very much in the spirit of static website they don't really change that much but when you want to blog about the analysis you're doing that's you know you're going to write a weekly report I did this this week all of that might require more r processing than you would typically do in the static pages so his whole concept of making the static website is that you're really what you're really interested in is sort of blogging sort of like you would tweet the blogging site it's all about a constant churn journal and what he was really doing is he was adding r capabilities into that blog aspect of the hugo website that answer basically what you're doing all this kind of offline sort of speak and then you upload it and so in practice the way just the way that works conveniently once you get it all set up so I have this see if I can find it right here I have this