Title: | Preparing, Checking, and Submitting Articles to the 'R Journal' |
---|---|
Description: | Create an 'R Journal' 'Rmarkdown' template article, that will generate html and pdf versions of your paper. Check that the paper folder has all the required components needed for submission. Examples of 'R Journal' publications can be found at <https://journal.r-project.org>. |
Authors: | Mitchell O'Hara-Wild [aut], Stephanie Kobakian [aut], H. Sherry Zhang [aut], Di Cook [aut, cre] , Simon Urbanek [aut], Christophe Dervieux [aut] |
Maintainer: | Di Cook <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.15 |
Built: | 2024-11-16 05:51:46 UTC |
Source: | https://github.com/rjournal/rjtools |
Create an R Journal article with the existing template
create_article( name = "test", file = xfun::with_ext(name, "Rmd"), create_dir = FALSE, edit = TRUE )
create_article( name = "test", file = xfun::with_ext(name, "Rmd"), create_dir = FALSE, edit = TRUE )
name |
the name of the Rmd, will default to "test" |
file |
File name for the draft |
create_dir |
|
edit |
|
Outputs an R Journal paper template set of files in the directory specified
by dir_path
or in the project directory, if nothing is specified.
See vignette("create_article", package = "rjtools")
for more details
on how to create and format an article.
A single article check
initial_check_article( path, dic = "en_US", pkg, ..., ask = interactive(), logfile = file.path(path, "initial_checks.log") ) check_filenames(path) check_structure(path) check_folder_structure(path) check_unnecessary_files(path) check_cover_letter(path) check_title(path, ignore = "") check_section(path) check_abstract(path) check_spelling(path, dic = "en_US", ...) check_proposed_pkg(pkg, ask = interactive()) check_pkg_label(path) check_packages_available(path, ignore) check_bib_doi(path) check_csl(path) check_date(path, file) get_orcid(path, file = NULL)
initial_check_article( path, dic = "en_US", pkg, ..., ask = interactive(), logfile = file.path(path, "initial_checks.log") ) check_filenames(path) check_structure(path) check_folder_structure(path) check_unnecessary_files(path) check_cover_letter(path) check_title(path, ignore = "") check_section(path) check_abstract(path) check_spelling(path, dic = "en_US", ...) check_proposed_pkg(pkg, ask = interactive()) check_pkg_label(path) check_packages_available(path, ignore) check_bib_doi(path) check_csl(path) check_date(path, file) get_orcid(path, file = NULL)
path |
string, path to the directory that contains the .tex file (Ideally, this directory should contain .bib, .Rmd, and .tex with author names and two RJwrapper files: RJwrapper.pdf and RJwrapper.tex) |
dic |
string, the dictionary used for spelling check. See
|
pkg |
string, optional. The name of the proposed package (if relevant), to be checked for activity on CRAN |
... |
additional arguments for spelling check with hunspell::hunspell |
ask |
logical, if |
logfile |
a connection for the output log, or a string with
the filename of the output log or |
ignore |
The words to ignore in title check, use c(pkg, pkg, ...) for multiple quoted words |
file |
string, the file name if multiple files are detected
under the |
Folder structure checks:
check_filenames()
: the three files (.bib, .Rmd, and .tex) all present and have consistent names
check_structure()
: check validity of all filenames and depth of the directory structure
check_unnecessary_files()
: the template file (i.e., RJtemplate.tex) is not included in the directory
check_cover_letter()
: a motivational letter
Content checks:
check_title()
: article title is in title case
check_section()
: section sections are in sentence case
check_abstract()
: abstract should be plain text without package
markups (CRANpkg, BIOpkg, pkg), math notations($...$), citations, and other
formattings (highlight, italic, etc)
check_spelling()
: potential spelling mistakes
check_proposed_pkg()
: package proposed in the paper is on CRAN
check_pkg_label()
: packages marked up with are not available
on CRAN or BioConductor
check_packages_available()
: packages mentioned in the article are
available on CRAN
check_bib_doi
: whether bib entries have DOI or URL included, uncless
can't sourced online
check_csl
: no additional csl file should be used
consistent, either in sentence (preferred) or title case
See vignette("create_article", package = "rjtools")
for how to use the check functions
list of all results (see log_error
for
details). You can use unlist()
to get a character vector
of the result statuses.
your_article_path <- system.file("sample-article", package = "rjtools") if (interactive()) initial_check_article(your_article_path)
your_article_path <- system.file("sample-article", package = "rjtools") if (interactive()) initial_check_article(your_article_path)
Available keywords options for R Journal articles
keywords
keywords
A vector of length 41
prep_submission
generate some answers based on the .tex file to fill
the article submission form. You can save the answers if assigned it to an
object.Prepare pre-filled fields in the submission form
prep_submission
generate some answers based on the .tex file to fill
the article submission form. You can save the answers if assigned it to an
object.
prep_submission()
prep_submission()
a list
The R Journal is built upon the distill framework with some modifications.
This output format behaves almost identically to the
distill::distill_article()
format, with some formatting and structural
changes. The rjournal_article()
format will produce both HTML and PDF
outputs, while the rjournal_pdf_article()
produces only the PDF output.
rjournal_article(toc = FALSE, self_contained = FALSE, legacy_pdf = FALSE, ...) rjournal_pdf_article(..., self_contained = FALSE) rjournal_web_article(toc = FALSE, self_contained = FALSE, ...)
rjournal_article(toc = FALSE, self_contained = FALSE, legacy_pdf = FALSE, ...) rjournal_pdf_article(..., self_contained = FALSE) rjournal_web_article(toc = FALSE, self_contained = FALSE, ...)
toc |
|
self_contained |
Produce a standalone HTML file with no external dependencies, using data: URIs to incorporate the contents of linked scripts, stylesheets, images, and videos. Note that even for self contained documents MathJax is still loaded externally (this is necessary because of its size). |
legacy_pdf |
whether an article is from the past and only have pdf version |
... |
Arguments passed to |
the rendered R Journal article
The R Journal is built upon the distill framework with some modifications. This output format produces the PDF for an R Journal issue.
The R Journal is built upon the distill framework with some modifications.
This output format behaves almost identically to the
distill::distill_article()
format, with some formatting and structural
changes.
rjournal_pdf_issue(..., render_all = FALSE) rjournal_web_issue(toc = FALSE, self_contained = FALSE, rnews = FALSE, ...)
rjournal_pdf_issue(..., render_all = FALSE) rjournal_web_issue(toc = FALSE, self_contained = FALSE, rnews = FALSE, ...)
... |
Arguments passed to |
render_all |
Re-render all articles in the issue, even if the page numbers have not changed. |
toc |
|
self_contained |
Produce a standalone HTML file with no external dependencies, using data: URIs to incorporate the contents of linked scripts, stylesheets, images, and videos. Note that even for self contained documents MathJax is still loaded externally (this is necessary because of its size). |
rnews |
This issue is from R News. |
an generated R Journal issue
This is a final self-check function, similar to that runs through a checklist on your submission that cannot be done automatically.
submit_rjournal()
submit_rjournal()
zip_paper
will first check the folder structure with
check_folder_structure()
before zipping up everything in the
main directory, excluding the .Rproj
file, if exist.
zip_paper()
zip_paper()
a zip file for an R Journal submission