What is R Markdown and Why is it better than Markdown and LaTeX

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
our markdown our markdown is probably the greatest document file format like ever it has just has so much flexibility functionality and you can do just about whatever you want with it I like Jupiter notebooks I mean it's it's it they're cool but our markdown combines both complexity and simplicity in a way that you can get everything you need out of it everything you want out of it and you don't need more than you absolutely need to to achieve your result like I don't need to know la tech to do an R markdown document in a great and very pretty pretty way you don't need to know a lot to walk into it and start producing good documents I mean in fact you create a new are markdown document I'm using our studio because it's the native environment you can write our markdown in vim if you want but if it involves code intellisense syntax highlighting and just more than just a basic document then i'm gonna use our studio but like I have my Viking research in in our markdown but like the only code chunks I'm using are the ones I have with my shortcuts to just put in pictures so I mean I'm not like coding or writing any code in here really for statistical analysis or anything it's really just creating a pretty document so in this case I might actually write it in vim and use focus mode but for our for our markdown and for all the complexity of our markdown I'm usually writing in our studio and if you just create a new document it gives you this blank document I can knit this document and you save it to a location to do tests it will compile through pan doc and we have a document this is just the the bare-bones simple template they just drop in some stuff and you can knit it and you can have a document now our markdown is amazing because it can do so much but we're getting a little bit ahead what is our markdown what is markdown what are any of these things and why are they useful now I'm not gonna tell you like a literal history lesson but markdown was created a long time ago and since it was created it's barely been changed a lot of people have hacked on it added stuff and done whatever but markdown as we know basic markdown has been around for a long time actually and it's really useful markdown is basically HTML you have equivalent tags so you know if you're writing HTML you have h1 for heading h2 h3 you know for subheadings and you have to have an opening tag a closing tag and this is one of the the reasons why XML is not a great data interchange format anymore is because all those extra tags take up file space it's not as lightweight as something like CSV or JSON now HTML has a lot of tags too now unlike XML HTML has very specific tags and you always know what an h1 is going to be and what it's going to do so in our markdown or in markdown if you're gonna do a heading you're not gonna type you know h1 whatever no you're not gonna type and get all the awkward angle bracket typing for a heading in our markdown I'm just gonna type the pound symbol or the hash symbol whatever you want it to be you start typing some text there you go that is your heading you can see in the test document that we had you know two headings right here these were a level two headings but let's remove that one and let's recompile and open up this PDF so you can see our markdown and including plots or the headings our markdown including plots these are the headings so equivalently your hash marks are the headers or the headings tags of HTML now if I was gonna do a couple other things like you can see that they have some angle brackets here and a link but you can do something else so let's do instead of angle bracket there I'm gonna put square brackets with this is a link inside of it and opening parenthesis paren and then a at the end closing paren now you can see that this text turned a pinkish color now what it's doing is this is now a hyperlink basically the a tag in HTML you have the text of the link and you have the hyperlink but let's do a couple other things before we do this I'm gonna say our markdown is gonna be bold well dead double asterisks instead of typing a bold tag we can do that let's see let's do this our margin over here we're gonna make that italic so I can just do a single asterisk or this document can just have underscore underscore does the same thing what else can we do here Oh after HTML let's do a new line ooh let's add do this do something with law tech math I could do dollar sign backward slash Phi and dollar sign preview yeah it works so I'm just doing a lot of a lot of stuff here at the moment but you know bear with me it's gonna cover a lot of this table of contents page break for some law tech stuff let's see what else can we do what else can we do [Music] print hello world please [Music] all right so we did some stuff we made a hyperlink we made some bold metallic stuff we added a Python code chunk let's just knit all this together and see what the result is as you can see there's a lot of stuff that you can put into our markdown but what is all this stuff going on it's getting mad with the law tech see if that helps is it just the mathjax it's mad at wow this thing is really mad with law tech right now all right have any more a lot of tech in there I don't know it's mad about but yes I don't know and it's be getting mad about something but we can actually change the content of our document to have that same different styling as HTML documents bold italic underline is not supported in markdown but you can jerry-rig it with the you tags in HTML or weird stuff with the span element they just recommend not doing underline but you can do strikethrough there's cheat sheets everywhere and in at least in vim I have Mike my my cheats cheat code Keys snippet things my hotkeys to do things like making super or subscript text like I can make a strikethrough text by just doing a to Tilda's and that'll make the text strikethrough let's see if this one actually knits better I'm not sure what's going on with this thing this one should knit and I'll go over what knitting means to so yeah we got a document we've got some stuff in here this is just some me analyzing and playing with my Fitbit data this is all horrible it's just me tossing something together to test out the patchwork package but strikethrough text and this is a heading so you can see that these tags work well I'll just test in this document because the other one was being weird so we have our bold text we're gonna do italic and we're gonna do underscore italic let's do some text with a super ^ 17 is basically what I want I'm telling it right here and then sub script do it tilde put that there and then let's see if I get the law tech working it should have worked earlier I'm not sure why it didn't so you can see it previews it should work save and knit let's see what we get please work I'm not sure why the law tech wasn't working on the other one but it worked here so I don't know what it was alright so we got you know I got my my law Tech table of contents I got a a paid I don't think I have a page break but I have table of contents which I like I really like the pdf law tech a table of contents I have my plot code I have my plot done and patchwork you know we got bold we got the to italic so you can do it with an asterisk or an underline it works for both I have my super text I have my subscript and then I even have you know the law tech mathjax stuff there's the Phi symbol so all this stuff is supported in our markdown we have HTML we have code chunks we have la tech we have mathjax with law Tech which is one of the the main things you use law tech for is you know math we can also have a bibliography now I have my document over here my leather work I actually have my bibliography referenced and then I have a references section at the bottom because the references will be just be put at the bottom and I actually referenced this document right here just with an @ symbol and then the name of the reference and if you look at my bibliography file in my documents bib you know here's that that reference and then I can have this reference in that document and then when this document is compiled it will actually include my references at the bottom which is again one of the major reasons why we would use law tech is that the bibliography is handled for you so literally all of this stuff can be done in our markdown references law tech HTML custom code that way code chunks that you can run like Python in our and Stan and C++ and sequel you can call our packages you can do your data analysis data cleaning and then you can write up all this stuff as documentation in line with your code and make these comprehensive and great-looking reports wiki type documents exploratory data analysis documents the sky's the limit really you can do so much with our markdown and all the stuff you can put into it and all the things that it works with it that it's highly flexible and customizable there's so much that you can do with this you can have custom parameters so that you can make a parameterised report so you could say I want to see all the data for all this analysis for a single stock ticker symbol and that ticker symbol is used as a parameter throughout the entire document in like 50 locations for all this different analysis you can change the ticker symbol at the beginning in the gamma portion of the document and I have a per am change that and then everything else in the document updates and you can have that for you know anything like there's this guy is literally the limit with our markdown and what you want to use it for so I'm gonna do a lot more videos on our markdown well I covered with a lot of things that's a surface level just now but I'm gonna talk about a lot more about our markdown and how to actually use it because I do use it for personal as well as professional reasons I actually create production documents in our markdown and production worthy reports in this format so it's really great format and I highly recommend you learn it that's all for now I will make another video on our markdown very soon
Info
Channel: Bryan Jenks
Views: 12,544
Rating: 4.2238808 out of 5
Keywords: arch, arch linux, thinkpad, x220, thinkpad x220, terminal, bash, vim, unix, tech, technology, software, code, coding, program, programming, software engingeering, scripting, shell, linux, rmarkdown, r markdown, LaTeX, markdown, is rmarkdown better than LaTeX, what is better than LaTeX, alternatives to LaTeX, what is better markdown or rmarkdown, how is rmarkdown different than markdown
Id: uccEhThn0ls
Channel Id: undefined
Length: 13min 52sec (832 seconds)
Published: Mon Dec 30 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.