advanced research methods

Task 1: Setting up Your R Markdown PortfolioAs above our overall goal is to make a reproducible “report” summarising the data in the Leibowitz and Judisch (1967) article. As we go along, remember to refer back to Week 02 Worksheet 01 and cheatsheets to help you. Let’s begin!1.Create a new R Markdown document.2.Give it a title, e.g. My Psychology Research Methods Portfolio3.Enter your GUID or name as the author4.Set the output as HTML.Helpful HintThroughout the worksheets you will see these Helpful Hints. Usually the solutions are nearby or at the end of the chapter to prevent temptation.In setting up this Rmd file, if you have followed these steps correctly, you will probably see a new R Markdown file with a header containing the title, author, date and output information as shown in W02 WS01.If you don’t see the document header, then you’ve probably created an R Script instead. Refer back to the WS01 activity and try again. Look further down the list of File options on the top menu. If stuck, try the discussion board, or Google.You can now remove the parts of the generic R Markdown code that we do not need; anything after the setup code chunk can be removed. So anything after line 11 can be removed. Leave the first code chunk however - lines 8 to 10 - as these lines make R Markdown show code chunks unless otherwise specified.Portfolio Point - Code Chunk RemindersAfter the worksheet is complete it might be handy to write a reminder somewhere in your portfolio about what a code chunk is. Writing it in your own notes somewhere accessible to you will mean you can find it more easily than searching through all the class materials for the right information. This is something to keep in mind for any information you come across that you might need to recall later on.Task 2: Give your Report a HeadingWe are going to start off your portfolio with creating a brief report on the Leibowitz and Judisch paper, so we should give it a heading.1.After the setup code chunk, give your report a heading, e.g., Lab 1 - The Magnitude of the Ponzo Illusion varies as a function of Age.2.Using hashtags, give this heading a Header 1 size.Helpful HintRemember that the fewer the number of hashtags the larger the heading size.Task 3: Creating a Code ChunkWe are going to need the data soon so best to bring it in at the start.1.Set your working directory: Session >> Set Working Directory >> Choose Directory2.If you are working on your own computer, download the data for this lab from Quercus. Unzip it and save it to the folder you are working in. If you haven’t already installed the “tidyverse”, you will need to run the following command in your console before going any further: install.packages(“tidyverse”)3.If you are in RStudio Cloud, the data is in your main W02 project directory, and the tidyverse is already installed for you.4.Create a new code chunk in your R Markdown script, give this code chunk the name load_data.5.Copy and paste the code below into your code chunk.6.Now, add or change the echo rule in your code chunk so that when you knit the file, the code will not be included in the final document. 



 Read less

Answer Detail

Get This Answer

Invite Tutor