diff --git a/docs/ISSUE_TEMPLATE.html b/docs/ISSUE_TEMPLATE.html index 0e65d1c1c..2a3fda9e0 100644 --- a/docs/ISSUE_TEMPLATE.html +++ b/docs/ISSUE_TEMPLATE.html @@ -60,7 +60,7 @@ rtables - 0.1.1 + 0.1.2 @@ -119,7 +119,7 @@

Reporting an Issue with rtables

-

Please briefly describe your problem and, when relevant, the output you expect. Please also provide the output of utils::sessionInfo() or devtools::session_info() at the end of your post.

+

Please briefly describe your problem and, when relevant, the output you expect. Please also provide the output of utils::sessionInfo() or devtools::session_info() at the end of your post.

If at all possible, please include a minimal, reproducible example. The rtables team will be much more likely to resolve your issue if they are able to reproduce it themselves locally.

Please delete this preamble after you have read it.


diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index ba1767eb4..826f7c423 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -60,7 +60,7 @@ rtables - 0.1.1 + 0.1.2
diff --git a/docs/articles/index.html b/docs/articles/index.html index c8eae4ff3..d760fcaab 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -60,7 +60,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/articles/rtables.html b/docs/articles/rtables.html index 54030e027..86dade9a4 100644 --- a/docs/articles/rtables.html +++ b/docs/articles/rtables.html @@ -30,7 +30,7 @@ rtables - 0.1.1 + 0.1.2 @@ -86,7 +86,7 @@

Introduction to rtables

Adrian Waddell

-

2019-02-25

+

2019-06-24

Source: vignettes/rtables.Rmd diff --git a/docs/articles/rtabulate.html b/docs/articles/rtabulate.html index ea6699c0d..d6bf35cbe 100644 --- a/docs/articles/rtabulate.html +++ b/docs/articles/rtabulate.html @@ -30,7 +30,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/authors.html b/docs/authors.html index eedc0911f..ad6cfb6b3 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -60,7 +60,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/index.html b/docs/index.html index 7f0052501..48fd20c14 100644 --- a/docs/index.html +++ b/docs/index.html @@ -32,7 +32,7 @@ rtables - 0.1.1 + 0.1.2 @@ -117,14 +117,15 @@

Installation

To install the stable release of rtables package run the following command in R:

-
devtools::install_github("roche/rtables", ref="v0.1.1")
+
devtools::install_github("roche/rtables", ref="v0.1.1")

To install the test version of rtables run

-
devtools::install_github("roche/rtables")
+
devtools::install_github("roche/rtables")

Usage

library(rtables)
+
 tbl <- rtable(
   header = c("Treatement\nN=100", "Comparison\nN=300"),
   format = "xx (xx.xx%)",
diff --git a/docs/news/index.html b/docs/news/index.html
index 881a46be6..b133bb17c 100644
--- a/docs/news/index.html
+++ b/docs/news/index.html
@@ -60,7 +60,7 @@
       
       
         rtables
-        0.1.1
+        0.1.2
       
     
@@ -118,6 +118,19 @@

Changelog

Source: NEWS.md
+
+

+rtables 0.1.2

+ +

rtables 0.1.1

@@ -179,6 +192,7 @@

Contents

diff --git a/docs/reference/as.rtable.html b/docs/reference/as.rtable.html index 299781f8c..896f9f574 100644 --- a/docs/reference/as.rtable.html +++ b/docs/reference/as.rtable.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2

diff --git a/docs/reference/as.rtable.table.html b/docs/reference/as.rtable.table.html index b31b52f25..b4ac1a9cc 100644 --- a/docs/reference/as.rtable.table.html +++ b/docs/reference/as.rtable.table.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/as_html.default.html b/docs/reference/as_html.default.html index 0aff54d40..aadbea6f1 100644 --- a/docs/reference/as_html.default.html +++ b/docs/reference/as_html.default.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/as_html.html b/docs/reference/as_html.html index ef2fb66d3..63aed383c 100644 --- a/docs/reference/as_html.html +++ b/docs/reference/as_html.html @@ -65,7 +65,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/as_html.rtable.html b/docs/reference/as_html.rtable.html index e7649648f..fbf3025f9 100644 --- a/docs/reference/as_html.rtable.html +++ b/docs/reference/as_html.rtable.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/compare_rtables.html b/docs/reference/compare_rtables.html index 909537099..be8811b89 100644 --- a/docs/reference/compare_rtables.html +++ b/docs/reference/compare_rtables.html @@ -65,7 +65,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/dim.rheader.html b/docs/reference/dim.rheader.html index 01180c505..fb892a60b 100644 --- a/docs/reference/dim.rheader.html +++ b/docs/reference/dim.rheader.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/dim.rtable.html b/docs/reference/dim.rtable.html index 229e44428..12fccffe9 100644 --- a/docs/reference/dim.rtable.html +++ b/docs/reference/dim.rtable.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/format_rcell.html b/docs/reference/format_rcell.html index 59a2e878e..50cbd2bcf 100644 --- a/docs/reference/format_rcell.html +++ b/docs/reference/format_rcell.html @@ -66,7 +66,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/header-set.html b/docs/reference/header-set.html index e2be2e99d..78c192566 100644 --- a/docs/reference/header-set.html +++ b/docs/reference/header-set.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/header.html b/docs/reference/header.html index 92a689a07..8947cff7b 100644 --- a/docs/reference/header.html +++ b/docs/reference/header.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/header_add_N.html b/docs/reference/header_add_N.html index bf05f8e5d..da294d916 100644 --- a/docs/reference/header_add_N.html +++ b/docs/reference/header_add_N.html @@ -64,7 +64,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/indent.html b/docs/reference/indent.html new file mode 100644 index 000000000..33371b571 --- /dev/null +++ b/docs/reference/indent.html @@ -0,0 +1,209 @@ + + + + + + + + +Change indentation of all rrows in an rtable — indent • rtables + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + +
+ +

Change indentation of all rrows in an rtable

+ +
+ +
indent(x, by = 1)
+ +

Arguments

+ + + + + + + + + + +
x

rtable object

by

integer to increase indentation of rows. Can be negative. If final indentation is smaller than 0 then the +indentation is set to 0.

+ + +

Examples

+
is_setosa <- iris$Species == "setosa" +mtbl <- rtable( + header = rheader( + rrow(row.name = NULL, rcell("Sepal.Length", colspan = 2), rcell("Petal.Length", colspan=2)), + rrow(NULL, "mean", "median", "mean", "median") + ), + rrow( + row.name = "All Species", + mean(iris$Sepal.Length), median(iris$Sepal.Length), + mean(iris$Petal.Length), median(iris$Petal.Length), + format = "xx.xx" + ), + rrow( + row.name = "Setosa", + mean(iris$Sepal.Length[is_setosa]), median(iris$Sepal.Length[is_setosa]), + mean(iris$Petal.Length[is_setosa]), median(iris$Petal.Length[is_setosa]), + format = "xx.xx" + ) +) +indent(mtbl)
#> Sepal.Length Petal.Length +#> mean median mean median +#> --------------------------------------------------------------------- +#> All Species 5.84 5.8 3.76 4.35 +#> Setosa 5.01 5 1.46 1.5
indent(mtbl, 2)
#> Sepal.Length Petal.Length +#> mean median mean median +#> ----------------------------------------------------------------------- +#> All Species 5.84 5.8 3.76 4.35 +#> Setosa 5.01 5 1.46 1.5
indent(mtbl, -3)
#> Sepal.Length Petal.Length +#> mean median mean median +#> ------------------------------------------------------------------- +#> All Species 5.84 5.8 3.76 4.35 +#> Setosa 5.01 5 1.46 1.5
+
+
+ +
+ +
+ + +
+

Site built with pkgdown 1.3.0.

+
+
+
+ + + + + + diff --git a/docs/reference/indented_row.names.html b/docs/reference/indented_row.names.html index 783c9935c..c98fec359 100644 --- a/docs/reference/indented_row.names.html +++ b/docs/reference/indented_row.names.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/index.html b/docs/reference/index.html index d51918a85..7bec64496 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -60,7 +60,7 @@ rtables - 0.1.1 + 0.1.2 @@ -250,7 +250,7 @@

rbind(<rtable>)

-

Stack rtable objects

+

Stack rtable and rrow objects

@@ -289,10 +289,28 @@

indent()

+ +

Change indentation of all rrows in an rtable

+ +

unlist(<rtable>)

Unlist method for rtables

+ + + +

unlist(<rcell>)

+ +

Unlist method for rcell

+ + + +

unlist(<rrow>)

+ +

Unlist method for rrow

diff --git a/docs/reference/is.no_by.html b/docs/reference/is.no_by.html index 08a452a4f..be68fb13f 100644 --- a/docs/reference/is.no_by.html +++ b/docs/reference/is.no_by.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/levels.no_by.html b/docs/reference/levels.no_by.html index f1c22b587..b3c653ce7 100644 --- a/docs/reference/levels.no_by.html +++ b/docs/reference/levels.no_by.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/list_rcell_format_labels.html b/docs/reference/list_rcell_format_labels.html index 7d7674fdd..83b70f13a 100644 --- a/docs/reference/list_rcell_format_labels.html +++ b/docs/reference/list_rcell_format_labels.html @@ -64,7 +64,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/names.rtable.html b/docs/reference/names.rtable.html index bdca547e4..d3201a0a4 100644 --- a/docs/reference/names.rtable.html +++ b/docs/reference/names.rtable.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/no_by.html b/docs/reference/no_by.html index 4e4c8d72d..707ee20fd 100644 --- a/docs/reference/no_by.html +++ b/docs/reference/no_by.html @@ -66,7 +66,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/order_rrows.html b/docs/reference/order_rrows.html index 04155469b..541dbd248 100644 --- a/docs/reference/order_rrows.html +++ b/docs/reference/order_rrows.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/order_rtables.html b/docs/reference/order_rtables.html index b125a72b5..53dd4e230 100644 --- a/docs/reference/order_rtables.html +++ b/docs/reference/order_rtables.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/rbind.rtable.html b/docs/reference/rbind.rtable.html index ab53d480f..db7a0aec3 100644 --- a/docs/reference/rbind.rtable.html +++ b/docs/reference/rbind.rtable.html @@ -6,7 +6,7 @@ -Stack rtable objects — rbind.rtable • rtables +Stack rtable and rrow objects — rbind.rtable • rtables @@ -30,7 +30,7 @@ - + @@ -64,7 +64,7 @@ rtables - 0.1.1 + 0.1.2 @@ -118,7 +118,7 @@
@@ -138,7 +138,8 @@

Arg ... -

rtable objects

+

rtable or length 0 rcell objects, the first object must be an +rtable object

gap @@ -179,21 +180,30 @@

Examp ) )) -tbl <- rbind(mtbl, mtbl2) -tbl

#> Sepal.Length Petal.Length +rbind(mtbl, mtbl2)
#> Sepal.Length Petal.Length #> mean median mean median #> ------------------------------------------------------------------- #> All Species 5.84 5.8 3.76 4.35 #> Setosa 5.01 5 1.46 1.5
-tbl <- rbind(mtbl, mtbl2, gap = 1) -tbl
#> Sepal.Length Petal.Length +rbind(mtbl, rrow(), mtbl2)
#> Sepal.Length Petal.Length #> mean median mean median #> ------------------------------------------------------------------- #> All Species 5.84 5.8 3.76 4.35 #> #> Setosa 5.01 5 1.46 1.5
-tbl <- rbind(mtbl, mtbl2, gap = 2) -tbl
#> Sepal.Length Petal.Length +rbind(mtbl, rrow("aaa"), indent(mtbl2))
#> Sepal.Length Petal.Length +#> mean median mean median +#> ------------------------------------------------------------------- +#> All Species 5.84 5.8 3.76 4.35 +#> aaa +#> Setosa 5.01 5 1.46 1.5
+rbind(mtbl, mtbl2, gap = 1)
#> Sepal.Length Petal.Length +#> mean median mean median +#> ------------------------------------------------------------------- +#> All Species 5.84 5.8 3.76 4.35 +#> +#> Setosa 5.01 5 1.46 1.5
+rbind(mtbl, mtbl2, gap = 2)
#> Sepal.Length Petal.Length #> mean median mean median #> ------------------------------------------------------------------- #> All Species 5.84 5.8 3.76 4.35 diff --git a/docs/reference/rbindl_rtables.html b/docs/reference/rbindl_rtables.html index a4221e07d..3223f87a6 100644 --- a/docs/reference/rbindl_rtables.html +++ b/docs/reference/rbindl_rtables.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2
diff --git a/docs/reference/rcell.html b/docs/reference/rcell.html index 54e332e11..b60a4da75 100644 --- a/docs/reference/rcell.html +++ b/docs/reference/rcell.html @@ -64,7 +64,7 @@ rtables - 0.1.1 + 0.1.2
diff --git a/docs/reference/rheader.html b/docs/reference/rheader.html index 36c04041a..a783da39f 100644 --- a/docs/reference/rheader.html +++ b/docs/reference/rheader.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/row.names-set-.rtable.html b/docs/reference/row.names-set-.rtable.html index 62363781c..d397ea188 100644 --- a/docs/reference/row.names-set-.rtable.html +++ b/docs/reference/row.names-set-.rtable.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/row.names.rheader.html b/docs/reference/row.names.rheader.html index 0811113c2..048cbbccc 100644 --- a/docs/reference/row.names.rheader.html +++ b/docs/reference/row.names.rheader.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/row.names.rtable.html b/docs/reference/row.names.rtable.html index d943369df..77704252f 100644 --- a/docs/reference/row.names.rtable.html +++ b/docs/reference/row.names.rtable.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/rrow.html b/docs/reference/rrow.html index ff3309d31..0db032709 100644 --- a/docs/reference/rrow.html +++ b/docs/reference/rrow.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/rrowl.html b/docs/reference/rrowl.html index b3c879ab9..39ec1c408 100644 --- a/docs/reference/rrowl.html +++ b/docs/reference/rrowl.html @@ -64,7 +64,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/rtable.html b/docs/reference/rtable.html index ef821b755..cf98215e0 100644 --- a/docs/reference/rtable.html +++ b/docs/reference/rtable.html @@ -64,7 +64,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/rtablel.html b/docs/reference/rtablel.html index 561f4eaa5..49acdfd2a 100644 --- a/docs/reference/rtablel.html +++ b/docs/reference/rtablel.html @@ -64,7 +64,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/rtabulate.data.frame.html b/docs/reference/rtabulate.data.frame.html index 126ac4c07..114975c51 100644 --- a/docs/reference/rtabulate.data.frame.html +++ b/docs/reference/rtabulate.data.frame.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/rtabulate.factor.html b/docs/reference/rtabulate.factor.html index 5bf745621..32f0a2557 100644 --- a/docs/reference/rtabulate.factor.html +++ b/docs/reference/rtabulate.factor.html @@ -64,7 +64,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/rtabulate.html b/docs/reference/rtabulate.html index 77767fcfd..d83e92c61 100644 --- a/docs/reference/rtabulate.html +++ b/docs/reference/rtabulate.html @@ -65,7 +65,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/rtabulate.logical.html b/docs/reference/rtabulate.logical.html index 0ffbac3a6..47c445312 100644 --- a/docs/reference/rtabulate.logical.html +++ b/docs/reference/rtabulate.logical.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/rtabulate.numeric.html b/docs/reference/rtabulate.numeric.html index 62d62cbc1..14b92630b 100644 --- a/docs/reference/rtabulate.numeric.html +++ b/docs/reference/rtabulate.numeric.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/sort_rrows.html b/docs/reference/sort_rrows.html index ea5cae850..400698262 100644 --- a/docs/reference/sort_rrows.html +++ b/docs/reference/sort_rrows.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/sort_rtables.html b/docs/reference/sort_rtables.html index ac93eb8b8..dbe948fbf 100644 --- a/docs/reference/sort_rtables.html +++ b/docs/reference/sort_rtables.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/sprintf_format.html b/docs/reference/sprintf_format.html index 44ad3ab31..6cc598363 100644 --- a/docs/reference/sprintf_format.html +++ b/docs/reference/sprintf_format.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/sub-.rheader.html b/docs/reference/sub-.rheader.html index c42ffd030..885b0af66 100644 --- a/docs/reference/sub-.rheader.html +++ b/docs/reference/sub-.rheader.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/sub-.rtable.html b/docs/reference/sub-.rtable.html index a3bdb6728..d4bc52e43 100644 --- a/docs/reference/sub-.rtable.html +++ b/docs/reference/sub-.rtable.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/toString.rtable.html b/docs/reference/toString.rtable.html index 094900d34..687eaa819 100644 --- a/docs/reference/toString.rtable.html +++ b/docs/reference/toString.rtable.html @@ -63,7 +63,7 @@ rtables - 0.1.1 + 0.1.2 diff --git a/docs/reference/unlist.rcell.html b/docs/reference/unlist.rcell.html new file mode 100644 index 000000000..36dcc8666 --- /dev/null +++ b/docs/reference/unlist.rcell.html @@ -0,0 +1,186 @@ + + + + + + + + +Unlist method for rcell — unlist.rcell • rtables + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + +
+ +

rtable, rrow, and rcell objects should not be unlisted. This allows us to create nested lists with rtables objects +and then flatten them to a list of rtable objects.

+ +
+ +
# S3 method for rcell
+unlist(x, recursive = TRUE, use.names = TRUE)
+ +

Arguments

+ + + + + + + + + + + + + + +
x

an R object, typically a list or vector.

recursive

logical. Should unlisting be applied to list + components of x?

use.names

logical. Should names be preserved?

+ +

Value

+ +

rrow object

+ + +
+ +
+ +
+ + +
+

Site built with pkgdown 1.3.0.

+
+
+
+ + + + + + diff --git a/docs/reference/unlist.rrow.html b/docs/reference/unlist.rrow.html new file mode 100644 index 000000000..001b38a66 --- /dev/null +++ b/docs/reference/unlist.rrow.html @@ -0,0 +1,186 @@ + + + + + + + + +Unlist method for rrow — unlist.rrow • rtables + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + +
+ +

rtable, rrow, and rcell objects should not be unlisted. This allows us to create nested lists with rtables objects +and then flatten them to a list of rtable objects.

+ +
+ +
# S3 method for rrow
+unlist(x, recursive = TRUE, use.names = TRUE)
+ +

Arguments

+ + + + + + + + + + + + + + +
x

an R object, typically a list or vector.

recursive

logical. Should unlisting be applied to list + components of x?

use.names

logical. Should names be preserved?

+ +

Value

+ +

rrow object

+ + +
+ +
+ +
+ + +
+

Site built with pkgdown 1.3.0.

+
+
+
+ + + + + + diff --git a/docs/reference/unlist.rtable.html b/docs/reference/unlist.rtable.html index c5dcf971f..538368552 100644 --- a/docs/reference/unlist.rtable.html +++ b/docs/reference/unlist.rtable.html @@ -32,8 +32,8 @@ - + @@ -64,7 +64,7 @@ rtables - 0.1.1 + 0.1.2 @@ -125,8 +125,8 @@

Unlist method for rtables

-

rtable objects should not be unlisted. This allows us to create nested lists with rtables objects and then flatten -them to a list of rtable objects.

+

rtable, rrow, and rcell objects should not be unlisted. This allows us to create nested lists with rtables objects +and then flatten them to a list of rtable objects.