Skip to content

Commit 194e794

Browse files
authored
Refactor R Markdown formatters.Rmd
Removed unused chunk for suggested dependent packages and updated chunk options. Signed-off-by: Joe Zhu <[email protected]>
1 parent d0ae5c6 commit 194e794

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

vignettes/formatters.Rmd

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,8 @@ editor_options:
1313
wrap: 72
1414
---
1515

16-
```{r, include = FALSE}
17-
# Change: suggested_dependent_pkgs <- c("")
18-
suggested_dependent_pkgs <- character(0) # Use an empty vector
19-
knitr::opts_chunk$set(
20-
collapse = TRUE,
21-
comment = "#>",
22-
eval = all(vapply(
23-
suggested_dependent_pkgs,
24-
requireNamespace,
25-
logical(1),
26-
quietly = TRUE
27-
))
28-
)
29-
```
30-
31-
```{r, echo=FALSE, message=FALSE}
32-
knitr::opts_chunk$set(comment = "#")
16+
```{r, echo=FALSE}
17+
knitr::opts_chunk$set(comment = "")
3318
library(formatters)
3419
```
3520

@@ -157,5 +142,5 @@ matrix_form.data.frame <- function(df) {
157142
)
158143
}
159144
160-
print(matrix_form.data.frame(mtcars))
145+
cat(toString(matrix_form.data.frame(mtcars)))
161146
```

0 commit comments

Comments
 (0)