Movatterモバイル変換


[0]ホーム

URL:


Title:Preparing, Checking, and Submitting Articles to the 'R Journal'
Version:1.0.18.1
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 athttps://journal.r-project.org.
License:MIT + file LICENSE
Encoding:UTF-8
RoxygenNote:7.3.3
Imports:distill, stringr, purrr, hunspell, fs, cli, glue, whisker,xfun, callr, rlang, yaml, yesno, utils, tinytex, bookdown,BiocManager, here, rmarkdown
Suggests:knitr, pdftools, rstudioapi, testthat (≥ 3.0.0)
VignetteBuilder:knitr
URL:https://github.com/rjournal/rjtools
BugReports:https://github.com/rjournal/rjtools/issues
Config/testthat/edition:3
Depends:R (≥ 4.1.0)
LazyData:true
NeedsCompilation:no
Packaged:2025-09-23 11:49:14 UTC; hornik
Author:Mitchell O'Hara-Wild [aut], Stephanie Kobakian [aut], H. Sherry Zhang [aut], Di CookORCID iD [aut, cre], Simon Urbanek [aut], Christophe DervieuxORCID iD [aut]
Maintainer:Di Cook <dicook@monash.edu>
Repository:CRAN
Date/Publication:2025-09-23 12:02:25 UTC

rjtools: 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 athttps://journal.r-project.org.

Author(s)

Maintainer: Di Cookdicook@monash.edu (ORCID)

Authors:

See Also

Useful links:


Create an R Journal article with the existing template

Description

Create an R Journal article with the existing template

Usage

create_article(  name = "test",  file = xfun::with_ext(name, "Rmd"),  create_dir = FALSE,  edit = TRUE)

Arguments

name

the name of the Rmd, will default to "test"

file

File name for the draft

create_dir

TRUE to create a new directory for the document(the "default" setting leaves this behavior up to the creator of thetemplate).

edit

TRUE to edit the template immediately

Details

Outputs an R Journal paper template set of files in the directory specifiedby 'dir_path' or in the project directory, if nothing is specified.Seevignette("create_article", package = "rjtools") for more detailson how to create and format an article.


A single article check

Description

A single article check

Usage

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)

Arguments

path

string, path to the directory that contains the .texfile (Ideally, this directory should contain .bib, .Rmd, and.tex with author names and two RJwrapper files: RJwrapper.pdfand RJwrapper.tex)

dic

string, the dictionary used for spelling check. Seedict argument in [hunspell::hunspell()]

pkg

string, optional. The name of the proposed package (ifrelevant), to be checked for activity on CRAN

...

additional arguments for spelling check with[hunspell::hunspell]

ask

logical, ifTRUE then checks may ask the user forinteractive input of missing information.

logfile

a connection for the output log, or a string withthe filename of the output log orNULL if no log shouldbe written

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 detectedunder thepath argument

Details

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 packagemarkups (CRANpkg, BIOpkg, pkg), math notations($...$), citations, and otherformattings (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 ‘⁠\pkg{}⁠’ are not availableon CRAN or BioConductor*check_packages_available(): packages mentioned in the article areavailable on CRAN*check_bib_doi: whether bib entries have DOI or URL included, unclesscan't sourced online*check_csl: no additional csl file should be usedconsistent, either in sentence (preferred) or title case

Seevignette("create_article", package = "rjtools") for how to use the check functions

Value

list of all results (seelog_error fordetails). You can useunlist() to get a character vectorof the result statuses.

Examples

your_article_path <- system.file("sample-article", package = "rjtools")if (interactive()) initial_check_article(your_article_path)

Keywords options for R Journal

Description

Available keywords options for R Journal articles

Usage

keywords

Format

A vector of length 41


Logging functions

Description

log_... functions produce a log entry.

journal_summary prints a quick summary (statuscounts) based on the journal.

simplify_journal returns a simplified form of theresults in the journal.

Usage

log_error(  text,  ...,  output = getOption("check.log.output", "cli"),  file = getOption("check.log.file", NULL),  signal = getOption("check.log.conditions", FALSE),  .envir = parent.frame())log_success(  text,  ...,  output = getOption("check.log.output", "cli"),  file = getOption("check.log.file", NULL),  signal = getOption("check.log.conditions", FALSE),  .envir = parent.frame())log_note(  text,  ...,  output = getOption("check.log.output", "cli"),  file = getOption("check.log.file", NULL),  signal = getOption("check.log.conditions", FALSE),  .envir = parent.frame())log_warning(  text,  ...,  output = getOption("check.log.output", "cli"),  file = getOption("check.log.file", NULL),  signal = getOption("check.log.conditions", FALSE),  .envir = parent.frame())journal_summary(journal = getOption("check.log.journal"), file = stdout())simplify_journal(journal = getOption("check.log.journal"))

Arguments

text

string, description of the error that occurred,will be passed toglue.

...

additional inputs for text passed to theglue function.

output

type of the output, can either a string ("cli"to use thecli package (default),"R" forstandard R facilities or"none" for no output) or aconnection. It uses the"check.log.output" option ifset.

file

connection to log a copy of the output to or NULL(default) if no additional copy is desired. It uses the"check.log.file" option.

signal

logical, ifTRUE then a condition is signalledat the end of the function. All conditions have superclass"RJcheckCondition" and subclass"RJCheck<result>"where<result> is one ofSUCCESS,NOTE,WARNING andERROR. They also have thecorresponding standard R condition classes. Uses option"check.log.conditions".

.envir

the environment used to find the text string replacements

journal

environment of the journal

Details

Most arguments are intended to be set with options to allow the useof the checking mechanism both in interactive and automatedsettings. There are four types of log entries: SUCCESS, NOTE,WARNING and ERROR. If the"check.log.journal" option is setto an environment then the entry is also added to the journal.

Value

log_... string with the result type. Thecorresponding condition object with a message and call isincluded in the"info" attribute (even if no conditionis signalled).

journal_summary table of the status counts

simplify_journal string matrix with columns "result"(status), "test" (name of the calling function) and "message"


Prepare pre-filled fields in the submission formprep_submission generate some answers based on the .tex file to fillthe article submission form. You can save the answers if assigned it to anobject.

Description

Prepare pre-filled fields in the submission formprep_submission generate some answers based on the .tex file to fillthe article submission form. You can save the answers if assigned it to anobject.

Usage

prep_submission()

Value

a list


R Markdown output formats for R Journal articles

Description

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 structuralchanges. The 'rjournal_article()' format will produce both HTML and PDFoutputs, while the 'rjournal_pdf_article()' produces only the PDF output.

Usage

rjournal_article(toc = FALSE, self_contained = FALSE, ...)rjournal_pdf_article(..., self_contained = FALSE, citation_package = "natbib")rjournal_web_article(toc = FALSE, self_contained = FALSE, ...)

Arguments

toc

TRUE to include a table of contents in the output

self_contained

Produce a standalone HTML file with no externaldependencies, using data: URIs to incorporate the contents of linkedscripts, stylesheets, images, and videos. Note that even for self containeddocuments MathJax is still loaded externally (this is necessary because ofits size).

...

Arguments passed to 'distill::distill_article()' for web articles,and 'rticles::rjournal_article()' for pdf articles.

citation_package

The LaTeX package to process citations,natbiborbiblatex. Usedefault if neither package is to be used,which means citations will be processed via the commandpandoc-citeproc.

Value

the rendered R Journal article


R Markdown output formats for R Journal issues

Description

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 structuralchanges.

Usage

rjournal_pdf_issue(..., render_all = FALSE)rjournal_web_issue(toc = FALSE, self_contained = FALSE, rnews = FALSE, ...)

Arguments

...

Arguments passed to 'distill::distill_article()'.

render_all

Re-render all articles in the issue, even if the page numbers have not changed.

toc

TRUE to include a table of contents in the output

self_contained

Produce a standalone HTML file with no externaldependencies, using data: URIs to incorporate the contents of linkedscripts, stylesheets, images, and videos. Note that even for self containeddocuments MathJax is still loaded externally (this is necessary because ofits size).

rnews

This issue is from R News.

Value

an generated R Journal issue


R Markdown site generator for the R Journal

Description

R Markdown site generator for Distill websites

Usage

rjournal_website(input, ...)

Arguments

input

Website directory (or the name of a file within the directory).

...

Currently unused.


Submit a paper to the R Journal

Description

This is a final self-check function, similar tothat runs through a checklist on your submissionthat cannot be done automatically.

Usage

submit_rjournal()

Various handy symbols to use in a command line UI

Description

Show symbols in console output

Usage

symbol_utf8

Format

An object of classlist of length 4.


Zip your directory for R Journal submission

Description

zip_paper will first check the folder structure with[rjtools::check_folder_structure()] before zipping up everything in themain directory, excluding the '.Rproj' file, if exist.

Usage

zip_paper()

Value

a zip file for an R Journal submission


[8]ページ先頭

©2009-2025 Movatter.jp