Posts

Showing posts from August, 2017

Writing functions - Part two

Writing functions - Part two Writing functions - Part two CillianMacAodh 27 August 2017 The current post will follow on from the previous post and describe another use for writing functions. R Markdown and reporting p values in APA format The function described here is designed for use with R Markdown. I would write a post about how great R Markdown is, and how to use it, but there is already a wealth of information out there; see here , here , and here for a sample. This post relates to producing an APA formatted pdf using the papaja package (Aust, 2017) . Specifically, I describe a function that can be used to report p values correctly according to APA guidelines. The problem One of the great things about R Markdown is the “in-line code” option, whereby, instead of typing numbers, you can insert the code for the value you wish to report, and when the document is compiled, the correct number is reported. How