Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: JOSS paper #342

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 58 additions & 8 deletions paper/paper.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ affiliations:

date: "`r Sys.Date()`"
bibliography: paper.bib
output: rticles::joss_article
output:
rticles::joss_article:
includes:
in_header: preamble.tex
csl: apa.csl
journal: JOSS
link-citations: yes
---

Expand All @@ -60,7 +62,8 @@ knitr::opts_chunk$set(
dpi = 300,
comment = "#>",
message = FALSE,
warning = FALSE
warning = FALSE,
results="asis"
)

options(width = 60)
Expand All @@ -87,9 +90,9 @@ The examples below illustrate the ease with which `{report}` can create detailed

## Demographics

Note that When using `rmarkdown`, setting a chunk option to `results = "asis"` will print the output as regular text, as below, for a rather seamless reading experience.
Note that when using `rmarkdown`, setting a chunk option to `results = "asis"` will print the output as regular text, as below, for a rather seamless reading experience.

```{r, results = "asis"}
```{r}
rempsyc marked this conversation as resolved.
Show resolved Hide resolved
library(report)

data <- data.frame(
Expand All @@ -111,24 +114,57 @@ cat(paste0("This study includes data from ",

## Models

```{r}
```{r, eval=FALSE}
m_lm <- lm(mpg ~ qsec + wt, data = mtcars)
report(m_lm)
```

::: {.blackbox data-latex=""}

```{r, echo=FALSE}
m_lm <- lm(mpg ~ qsec + wt, data = mtcars)
report(m_lm)
```

:::

```{r, eval=FALSE}
library(lme4)
m_lmer <- lmer(Sepal.Length ~ Petal.Length + (1 | Species), data = iris)
report(m_lmer)
```

::: {.blackbox data-latex=""}

```{r, echo=FALSE}
library(lme4)
m_lmer <- lmer(Sepal.Length ~ Petal.Length + (1 | Species), data = iris)
report(m_lmer)
```

:::

```{r, eval=FALSE}
library(rstanarm)
m_rstan <- stan_glm(mpg ~ qsec + wt, data = mtcars, refresh = 0, iter = 1000)
report(m_rstan)
```

::: {.blackbox data-latex=""}

```{r, echo=FALSE}
library(rstanarm)
m_rstan <- stan_glm(mpg ~ qsec + wt, data = mtcars, refresh = 0, iter = 1000)
report(m_rstan)
rempsyc marked this conversation as resolved.
Show resolved Hide resolved
```

:::

## Tables

If preferred, you can output the information as a table instead.

```{r, results="asis"}
```{r}
library(insight)

export_table(format_table(report_table(m_lm)), format = "markdown")
Expand All @@ -142,7 +178,19 @@ export_table(format_table(report_table(m_rstan)), format = "markdown")

You can also seamlessly integrate `{report}` with *tidyverse* workflows:

```{r, warning=FALSE}
```{r, warning=FALSE, eval=FALSE}
library(dplyr)

iris %>%
select(-starts_with("Sepal")) %>%
group_by(Species) %>%
report() %>%
summary()
```

::: {.blackbox data-latex=""}

```{r, warning=FALSE, echo=FALSE}
library(dplyr)

iris %>%
Expand All @@ -152,6 +200,8 @@ iris %>%
summary()
```

:::

# Conclusion

The `{report}` package is a valuable tool for researchers who use R to analyze data and create reports for publication. It can help standardize and improve results reporting while saving researchers time and improving the quality of their work.
Expand Down
Loading