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

Update README.Rmd by tableone #369

Merged
merged 10 commits into from
May 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
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