Skip to content

Commit

Permalink
readme updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ddsjoberg committed Oct 28, 2023
1 parent d4715aa commit 97b15b6
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
11 changes: 6 additions & 5 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,21 @@ The `tidycmprsk` plays well with other packages, such as `gtsummary`.
tbl <-
crr_mod %>%
gtsummary::tbl_regression(exponentiate = TRUE) %>%
gtsummary::add_global_p(anova_fun = gtsummary::tidy_wald_test) %>%
add_n(location = "level")
```

```{r gtsummary_print, include = FALSE}
# Had to manually save images in temp file, not sure if better way.
gt::gtsave(gtsummary::as_gt(tbl), file = file.path(tempdir(), "temp.png"))
gt::gtsave(gtsummary::as_gt(tbl), file = "man/figures/README-gtsummary-crr.png")
```

```{r out.width = "50%", echo = FALSE}
# Have to do this workaround since the README needs markdown format for GitHub page but a different format for the website.
if (identical(Sys.getenv("IN_PKGDOWN"), "true")) {
tbl
} else {
knitr::include_graphics("man/figures/README-gtsummary_print-1.png")
knitr::include_graphics("man/figures/README-gtsummary-crr.png")
}
```

Expand Down Expand Up @@ -109,15 +110,15 @@ tbl <-

```{r gtsummary_print2, include = FALSE}
# Had to manually save images in temp file, not sure if better way.
gt::gtsave(gtsummary::as_gt(tbl), file = file.path(tempdir(), "temp.png"))
gt::gtsave(gtsummary::as_gt(tbl), file = "man/figures/README-gtsummary-cuminc.png")
```

```{r out.width = "70%", echo = FALSE}
# Have to do this workaround since the README needs markdown format for GitHub page but a different format for the website.
if (identical(Sys.getenv("IN_PKGDOWN"), "true")) {
tbl
} else {
knitr::include_graphics("man/figures/README-gtsummary_print2-1.png")
knitr::include_graphics("man/figures/README-gtsummary-cuminc.png")
}
```

Expand All @@ -130,4 +131,4 @@ By contributing to this project, you agree to abide by its terms. Thank you to a
#### Limitations

The `tidycmprsk` package implements most features (and more) available in `cmprsk`.
However, the time interaction features available in `cmprsk::crr()` have not yet been made available in `tidycmprsk`.
However, the time interaction features available in `cmprsk::crr()` is not available in `tidycmprsk`.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ The `tidycmprsk` plays well with other packages, such as `gtsummary`.
tbl <-
crr_mod %>%
gtsummary::tbl_regression(exponentiate = TRUE) %>%
gtsummary::add_global_p(anova_fun = gtsummary::tidy_wald_test) %>%
add_n(location = "level")
```

<img src="man/figures/README-gtsummary_print-1.png" width="50%" />
<img src="man/figures/README-gtsummary-crr.png" width="50%" />

``` r
gtsummary::inline_text(tbl, variable = age)
Expand Down Expand Up @@ -118,7 +119,7 @@ tbl <-
add_n()
```

<img src="man/figures/README-gtsummary_print2-1.png" width="70%" />
<img src="man/figures/README-gtsummary-cuminc.png" width="70%" />

## Contributing

Expand All @@ -145,4 +146,4 @@ you to all contributors!

The `tidycmprsk` package implements most features (and more) available
in `cmprsk`. However, the time interaction features available in
`cmprsk::crr()` have not yet been made available in `tidycmprsk`.
`cmprsk::crr()` is not available in `tidycmprsk`.
Binary file added man/figures/README-gtsummary-crr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added man/figures/README-gtsummary-cuminc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed man/figures/README-gtsummary_print-1.png
Binary file not shown.
Binary file removed man/figures/README-gtsummary_print2-1.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-4-1.png
Binary file not shown.

0 comments on commit 97b15b6

Please sign in to comment.