![]() ![]() The date being the date on which I created the folder, and doing so means alphanumerically sorting the folders also sorts them chronologically. ![]() I always start each project by making a new folder where I’m planning to keep everything and name it using the convention “yyyy-mm-dd-project-name”. This is what works for me, if it doesn’t work for you, you do you. I do often end up with other random files in the folder that I don’t have a home for and that’s fine, but at least most things have a home. Then in the main directory I have the R project file, my references, and my RMarkdown file with the write up in it. I have separate folders for my code, data, images, meeting notes, and tables. ![]() Below is a toy example of what a nicely organised project folder might look like: -chapter-3 There are plenty of resources out there on good folder structures, so I won’t spend too long here. It might not be super necessary but having a consistent way of organising things makes it easier to find what you’re looking for when you come back to a project after a year. My brief stint in web development taught me a lot about directory structure, which is why I do things this way. This section isn’t required by the way, but starting out with a coherent and organised folder structure is nice. If you’re a linux user… Well you probably know how to do all of this anyway, or at the very least you’re a sucker for software punishment so will have no qualms googling your own problems. All this stuff is probably functionally the same on Mac but I couldn’t tell you so you might need to translate my Windows instructions into Mac. I can’t promise I can help but it’s possible. If you are really stuck you can always send me a tweet. If you’re unsure about what something means you can google it - this is how I learned most of my knowledge. Also, there is some degree of assumed knowledge in this post, for example you know what it means to knit a document or what a code chunk is. No idea if it works the same if you knit to other formats. I write all my documents and knit to PDF, so all my advice is based around this setup. What I will show you though is all the things that I think are really swell. This isn’t going to be comprehensive but hopefully it gives you enough of an idea that if you run into trouble you can google your way out of it.īefore we get into why writing reports using RMarkdown is a no-brainer I want to preface that I am absolutely not an expert in R or RMarkdown and it’s quite possible there are smarter/cleaner/more efficient ways of doing everything here. There probably is already, but I figured I would write my own mini-guide on the things I do that make writing so much easier in RMarkdown. The above tweet seemed to be well received and someone asked if there was a tutorial. Ben Harrap ( ( BHarrap?)) February 9, 2022 Just knowing that if my cleaning or analysis changes it automatically flows down into the paper is magical #rstats I gotta say, it's so incredibly satisfying having written this paper using RMarkdown and automating every number in the text. If you’re a non-R user I hope this blog post convinces you to ditch other word processing software and make the jump to RMarkdown. ![]() RMarkdown, along with bookdown, has made my life so much easier when it comes to writing up papers and reports. Automatic numbering for tables and figures. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |