If you pass a list to apa_table(), all list elements are merged by columns into a single ame and the names of list elements are added to the table according to the setting of merge_method. The function performs no calculations but simply prints any ame it is given. Unfortunately, in papaja table formatting is somewhat limited for Word documents due to missing functionality in pandoc (e.g., it is not possible to have cells or headers span across multiple columns). This table was created with apa_table().Īpa_table() creates tables that are inspired by the examples presented in the APA manual and that adhere to its guidelines. These arguments take named lists of arguments that are passed on to the respective functions from the graphics package (which comprises R’s standard plotting functions), such as points(), arrows(), and legend().Ĭonsider the following code and the resulting Figure 4.3 for a customized version of the previous beeswarm plot. The visual elements of the plots can be customized by passing options to the arguments args_points, args_error_bars, args_legend, and so on. If the data encompass multiple observations per participant-factor-level-combination, these observations are aggregated.īy default, the condition means are computed but you can specify other aggregation functions via the fun_aggregate argument. However, the arguments tendency and dispersion can be used to overwrite these defaults and plot other statistics.įor example, to plot within-subjects rather than between-subjects confidence intervals you can set dispersion = within_subjects_conf_int. Mesures of central tendency and dispersion default to the mean and 95% confidence intervals. names of dependent variable, factors and levels, and optionally a legend.The dependent variable dv, and the between- or within-subjects factors of the design.Ĭurrently, zero to four factors are supported.įor each cell of the design, the functions plot The other arguments expect the names of the columns that contain the subject identifier id, Small points represent individual observations, large points represent condition means, and error bars represent 95% confidence intervals.Ī ame that contains the data in long format is passed to the data argument. Given the lossless compression in PNG and the decent resolution of 300 DPI this should not be a problem in print.įigure 4.2: An example beeswarm plot. Note, if you define transparent colors in your plots (e.g., when you define colors using rgb()), the rendered document will always display the pixel-based PNG files, regardless of the target document format. The files can be found in the mydocument_files folder that is generated when mydocument.Rmd is knitted. When the target document format is PDF the vectorized PDF files are included when the target document format is DOCX the pixel-based PNG files are included. In papaja-documents, by default, all figures are saved as vectorized PDF and pixel-based PNG files at a resolution of 300 DPI, which should in most cases be sufficient for a print publication. Refer to the plot-related knitr chunk options for an overview of all options. 8.1.1 Customizing the document preambleįigure 4.1: A basic scatterplot of the cars dataset.įigure display size, resolution, file format and many other things can be controlled by setting the corresponding chunk options.4.5.1 Inserting variables before they have been computed.4.4.1 Reporting models and tests in a table.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |