Posts

Showing posts from January, 2016

APA Tables in R

Image
Generating decent tables in R is something I have struggled with for some time, particularly when these need to follow  APA   guidelines . SPSS has proved to be a complete nightmare so in the past I've simply built templates in Word and copied the numbers across manually from the R console. This is both time-consuming and increases the chances of human error. Fortunately, David Stanley has written a  great library that can quickly generate results and place them in APA tables. One note of caution - your data frame must be complete (i.e. no missing values) and only include variables you want to appear in the table.  Subsetting your main data frame beforehand may be required in the first instance. Otherwise, it is plain sailing: For example, a data-set with six personality factors calculated from the HEXACO  personality inventory across several hundred participants might look like this... To generate an APA correlation table run the following: ##load library l ibr