Skip to content

Commit

Permalink
Update README.Rmd by tableone (#369)
Browse files Browse the repository at this point in the history
* Update README.Rmd by tableone

* Re-build README.Rmd

* installing and rendering readme

* Re-build README.Rmd

* updates

* Update README.md

* Update NEWS.md

* Increment version number to 0.2.0.9002

* Re-build README.Rmd

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Daniel Sjoberg <danield.sjoberg@gmail.com>
  • Loading branch information
3 people authored May 8, 2022
1 parent 66e23b9 commit bce1f5a
Show file tree
Hide file tree
Showing 5 changed files with 547 additions and 9 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: visR
Title: Clinical Graphs and Tables Adhering to Graphical Principles
Version: 0.2.0.9001
Version: 0.2.0.9002
Authors@R: c(
person(given = "Mark",
family = "Baillie",
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

* Improved documentation for `visr()` and other generic functions. (#301)

* The `README` page has been updated with additional examples. ()

# visR 0.2.0

* Initial CRAN release.
Expand Down
27 changes: 24 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ Install the *latest stable* version from [GitHub](https://github.com/) with:
devtools::install_github("openpharma/visR", ref = "main")
```

## Example
## Examples

This is a basic example to demonstrate how the API can be used to add layers to a visualization. In this example a time to event analysis. The example calculates stratified Kaplan-Meier by treatment and then plots. Additional functions can be used to add uncertainty intervals, censoring information and a risk table.
#### Visualization

This is a basic example to demonstrate how the API can be used to add layers to a visualization. This example demonstrates a time-to-event analysis. The example calculates and then plots stratified Kaplan-Meier by treatment. It is possible to add uncertainty intervals, censoring information, and a risk table using additional functions.

```{r example, warning=FALSE, message = FALSE}
library(visR)
Expand All @@ -103,6 +105,25 @@ adtte %>%
)
```


#### Summary Table

The `tableone()` function presents summary statistics in a table format.

```{r table, warning=FALSE, message = FALSE}
## table by treatment - without overall and render with GT
adtte %>%
dplyr::select(AGE, SEX, TRTA) %>%
visR::tableone(
strata = "TRTA",
overall = TRUE,
title = "Cohort Summary",
datasource = "ADaM Interim Dataset for Time-to-Event Analysis",
engine = "gt"
)
```


## Cite visR

```{text, comment="", eval = FALSE}
Expand All @@ -117,4 +138,4 @@ Thank you to all contributors:
```{r warning=FALSE, echo=FALSE, message=FALSE}
contr <- usethis::use_tidy_thanks("https://github.com/openpharma/visR")
```
`r unique(c(paste((paste0("[&#x0040;",contr,"](https://github.com/", contr, ")")), collapse = ", "), "[&#x0040;cschaerfe ](https://github.com/cschaerfe)", "[&#x0040;AlexandraP-21 ](https://github.com/AlexandraP-21)"))`
`r unique(c(paste((paste0("[&#x0040;",contr,"](https://github.com/", contr, ")")), collapse = ", "), "[&#x0040;cschaerfe ](https://github.com/cschaerfe)", "[&#x0040;AlexandraP-21 ](https://github.com/AlexandraP-21)"))`
Loading

0 comments on commit bce1f5a

Please sign in to comment.