Looking to use R Markdown to create your thesis? You have come to the right place. R Markdown is a great tool for integrating data analysis and report writing, but it can be a bit daunting to get started. I wrote my thesis with R Markdown last year, and sure spent quite some time browsing the internet figuring out how to get my text, code, and figures to work together and turn into a coherent thesis. But it was worth the struggle (and an excellent way to procrastinate), and I’d love to share with you what I’ve learned. This will be a series of blog posts discussing how to write a thesis with R Markdown. We’ll start with the very basics: installing the necessary software and getting familiar with the various markup languages you’ll need. Then we’ll prepare an R Markdown document that will represent one thesis chapter. Getting started: What do we need? Don’t worry, it sounds way scarier than it actually is.
Markdown is a very simple and straightforward language. No need to worry about it now, but if you’d like to get more familiar with it have a look at this reference guide or learn it here. R Markdown is almost the same as Markdown, but has the added feature off embedding and dealing with R code in your documents. LaTeX is another markup language, that is not as easy to read and write as Markdown but allows for much more flexibility in creating your document. The code that is placed at the top of document is called YAML, and it explains how the document should be rendered. BiBTeX is an excellent reference management system (if you are used to the horror of inserting references with MS word add-ons, you are going to be really happy using this :). BiBTeX files can be created with Mendeley, more on this later. Click on the image to enlarge. You can see there’s quite a few different languages used in the same document. In the next blog post we will go into the details of each of these parts of the document. OK. This opens a standard R Markdown file (.rmd) with some instructions. And if you have any questions, feel free to leave a comment. You may find yourself worrying about this at some poin (probably not yet, but when you do, you’ll know where to look): there are multiple types of markdown, which are called flavours. Examples are ‘github markdown’, ‘multiple markdown’ and ‘pandoc markdown’. The markdown we are using here is called pandoc markdown.
If you do your “homework” well your supervisory committee will help you. Don’t select committee members solely on content expertise, although this is important. Select faculty for your committee who are supportive of you and are willing to assist you in completing your research. You want a committee that you can ask for help and know that they will provide it for you. Don’t forget, you can always access content experts, but you rely on your committee members for guidance and encouragement. Set up a formal meeting with your full committee to discuss your research proposal as soon as possible. Make sure that your supervisor and committee members are fully supportive of the project before you begin. The proposal meeting should be seen as an opportunity for you and your supervisory committee to reach agreement on the fundamental goals and procedures for your research. Don’t go into the proposal meeting with the feeling that it is you against them! Provide the committee members with a well-written proposal well in advance of meetings.
Check with them to see how much time they will need to read the proposal. Plan the proposal meetings well. If graphic presentations are necessary to help the committee, make sure they are clear and attractive. Rehearse your presentation. A well planned meeting will help your committee understand that you are prepared to move forward with well planned research. Depending on the amount of detail you included in your proposal, you may not need or want to repeat every point. However, you should not assume all your committee members read the proposal carefully, and you should be sure to cover all important facts and issues. The major myth in writing a dissertation is that you start writing at Chapter One and write straight through. This is seldom the case. The most productive approach in writing the dissertation is often to begin writing those parts of the dissertation with which you are most comfortable. Then complete the various sections as you think of them.
At some point you will be able to print and spread out in front of you all of the sections that you have written. You will be able to sequence them in the best order and to see what is missing and should be added to the dissertation. This approach builds on those aspects of your study that are of most interest to you at any particular time. Go with what interests you, start your writing there, and then keep building! View What is a Dissertation? Gary Shank for more. If you prepared a comprehensive proposal you will now be rewarded! Pull out the proposal and check your proposed plan. Change from future tense to past tense and then make additions or changes so that the methodology section truly reflects what you did. You have now been able to change sections from the proposal to sections for the dissertation. Move on to the Statement of the Problem and the Literature Review in the same manner. If your study has specific names of people, institutions and places that must be changed to provide anonymity don’t do it too soon.