papaja | Preparing APA Journal Articles ) is an R package | Data Visualization library
kandi X-RAY | papaja Summary
kandi X-RAY | papaja Summary
papaja: Prepare APA journal articles with R Markdown.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of papaja
papaja Key Features
papaja Examples and Code Snippets
Community Discussions
Trending Discussions on papaja
QUESTION
I'm creating an R Markdown document using the 'papaja' package and the 'apa7' LaTeX template. When used together, the latter package and template currently produce a conflict due to duplicated \author
and \affiliation
fields in the tex
file. Earlier, a method was found to resolve this conflict that worked by adding the following LaTeX commands to the preamble (through header-includes
in the YAML header):
ANSWER
Answered 2022-Jan-08 at 23:41I found a book on the Papaja package. That link will bring you to the YAML section. I think this is what you were looking for.
First, there doesn't appear to be an association for APA 7, unless you have the development version of Papaja
. That being said, there is a ticket on this in their main github.
If you set the output to apa6_docx, this "and &" error won't be there. (And even if it were, you could have deleted it.) You can save it as a PDF from there. I'm not sure if this is an option for you, but I thought I would mention it.
This is what it states about subsequent authors (and much more).
QUESTION
I am trying to use a gtsummary
table within a papaja::apa6_pdf
document to include a formatted (with caption) kable
table. However, it's not rendering as expected. In contrast, the gtsummary
kable
table renders well in a normal rmarkdown::pdf_document
(though gtsummary
kableExtra
table also doesn't look great). I'd appreciate any suggestions on how to get gtsummary
and papaja
to play well together to produce a "pretty" PDF table. Thank you!
ANSWER
Answered 2021-Aug-06 at 12:42Probably the most general solution is to specify the table output format in as_kable()
.
QUESTION
*Edited to simplify example
I'm trying to use apa_table() to include a table of inclusion exclusion criteria for a review paper. I have already made the table in excel but I'm trying to move into using Rstudio and Rmarkdown for all my academic writing.
The table looks like this in excel
Inclusion Exclusion Rationale 1. Publication Peer reviewed Journal Sources other than peer reviewed journals (i.e. professional publications, grey literature) To ensure the quality of... 2. Article type Research/Empirical articles presenting methods and results suitable for analysis and synthesis Articles describing interventions without presenting research findings (i.e. theraputuc manuals) To evaluate evidence for a given... 3. Language Articles published or available in English Articles unavailable in English No access to translation service 4. Program type Program that explicitely target... Interventions that do not include.... To ensure the review focuses on...I'm much more comfortable in python and with the reticulate I figured I could just pass a Pandas dataframe to R and make the table, but when I do the knitted document shows the table like this:
I have also just tried to use markdown text and the result is... closer
the code I've used is
...ANSWER
Answered 2021-Jul-27 at 14:50Answering just in case this helps someone who was in my position.
Based on feedback from comments above I have found a solution that works for what I need. I'm sure someone more competent with R and LaTex could have produced a much better solution than this, but this has worked for me.
I first ran the apa_table()
function to take a look at the output
QUESTION
When I knit the R-Markdown file for the APA-styled document, I saw that "et al" is not used in the output pdf file, instead the author names were not suppressed but written each time. I found the answer to this problem for pdf outputs here:
...ANSWER
Answered 2021-Jun-03 at 06:17This seems to be a recent bug that I hope we will be able to address soon. However, there is a workaround: papaja
relies on Citation Style Language CSL, and therefore, you can manually download the apa.csl
file from here and put it in the same directory as your .rmd
file. You can then include the CSL file via this additional line in the YAML header of your document:
QUESTION
Compiling the following RMarkdown document in which I use the doc
mode of the apa6
class.
ANSWER
Answered 2021-Jun-01 at 22:01You could use header includes. The following additional lines in your YAML header should yield the desired behavior:
QUESTION
Based on the answer to this question, I was able to get 2-column papaja with listings wrapping (rather than overflowing column width). But the listings package turns off various features that help code listings and R output stand out relative to the main text.
A simple solution would be if I could globally change the font faces and/or sizes selectively for code and R output. Is there a way to do that in papaja? I haven't been able to figure this out from papaja or Rmarkdown documentation. Thank you!
...ANSWER
Answered 2021-Apr-20 at 20:19When you use the listings package in a papaja (or bookdown) document, what is technically happening is that all code is wrapped into an lstlisting
LaTeX environment that comes with its own capabilities of customizing code appearance. Hence, you don't see the syntax highlighting that you would otherwise see if you would not use the listings
package. The documentation of the listings package with instructions how to style your code can be found here.
To make use of this, you can extend the YAML header of your papaja document like this:
QUESTION
Thanks for making papaja. It's really terrific!
I just submitted my first journal article using it and ran into problems. The layout staff don't know what to do with the code chunks and listings that are fine in single-column, full page format, but not in their 2-column format. I'm trying use the class 'jou' option to make 2 columns, but I can't figure out how to control the size of code and listing fonts (possibly by modifying the css, as recommended here), or how to using the latex package 'listings' to set listings to wrap (as recommended here).
I'd be grateful for any advice, and my apologies if I've missed how one might do this in the documentation.
...ANSWER
Answered 2021-Apr-19 at 19:45If it's only about getting the listings
package to work, you can modify the YAML header that it looks similar to the following:
QUESTION
Please help me to round values (example: from 4.23 to 4 and 4.5 to 5). I have code such as below. I need do this on my frontend part:
...ANSWER
Answered 2021-Feb-26 at 09:32You need to use h:outputText
instead of h:outputLabel
. With h:outputText
you can use f:convertNumber
to format a numeric value. With format="0"
it'll round the value. So:
QUESTION
I'm trying to write a paper in papaja/Rmarkdown. I use the following code to create an APA table:
...ANSWER
Answered 2020-Aug-22 at 06:36The answer was simple, I had to change an option in the YAML metadata of my document.
This: floatsintext : no
to this:
floatsintext : yes
QUESTION
I'm rendering a table using apa_table()
function of papaja
package with success. When I used this function in the past (months ago) I was able to use latex special characters to custom the rendering.
However, it seems that the function now overwrite the initial character strings to render its exact content in latex format.
...ANSWER
Answered 2020-Jun-30 at 13:55You just need to add escape = FALSE
to the arguments to apa_table(table)
, i.e. use
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install papaja
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page