View source: R/Rcitation_appendix.R
Rcitation_appendix | R Documentation |
Function that allows the creation of a full APA-style table with all citations and informations
on the R-packages utilized.
The table will contain the following columns (Packagename | Version | Maintainer | Citation)
The function writes two files (in a given directory)
The APA style table as .docx (default, or as .csv if desired)
A .bib file for the correct citations.
The citation column needs to be filled manually by importing the .bib
file in the reference manager
of your choice (e.g., mendeley, endnote, ...) and pasting the citation in the
respective column
Note I highly recommend to cite the main packages used for your
analysis in the methods / analyses section of your manuscript. However to
give full credit to all packages / package authors, you can create this table
and reference it in the appendix. This also increases reproduciblity, as every
dependency to run your script becomes transparent.
Rcitation_appendix( outdirectory = "Appendix", filename = "Appendix - R Packages.docx", overwrite = FALSE, table_caption = c("Table A1", "All R-Packages Utilized and Dependencies"), ... )
outdirectory |
(Optional) Character vector for the output directory (for the two files, .bib and .csv). Default is "Appendix/" in the current working directory (see with getwd()) |
filename |
(Optional) Character vector. Custom name for the formatted APA-style table, that should end with .docx. A docx file will be provided. If NA, a csv file of the table will be saved. |
overwrite |
(Optional) Boolean, default is FALSE. When overwrite is
FALSE and the files already exists, a serialized version of the filename
will be created (i.e., appending _001, or _002). Utilizes |
table_caption |
Takes a character vector. For reference see see
|
... |
(Optional), Additional arguments that can be passed to |
Creates (respective returns, depending on the arguments specified) the following:
Creates the directory Appendix/ (if no other outcomedirectory is specified)
In the "Appendix/" dir a .bib file is created for the citation
Either creates an APA 7th style table in a .docx or a plain .csv table
Additionally returns the flextable::flextable
object with the APA 7th style table.
Bjoern Buedenbender
flextable
, serialNext
, format_flextable
## Not run: # Not executed example, as it creates unnecessary files in the package Rcitation_appendix() ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.