Learn R Programming

tangram.pipe (version 1.1.2)

print.tangram.pipe: Printing a Table

Description

Prints a finished table created from tangram.pipe.

Usage

# S3 method for tangram.pipe
print(x, ...)

Value

A dataframe object containing the information from the last element of a tangram.pipe class object created using tbl_out(). This is the finalized table object.

Arguments

x

the name of the tbl_start object previously initialized.

...

further arguments passed to or from other methods.

Examples

Run this code
iris$color <- sample(c("Blue", "Purple"), size=150, replace=TRUE)
iris$Stem.Size <- sample(c("Small", "Medium", "Medium", "Large"), size=150, replace=TRUE)
iris$Leaf.Color <- "Green"
x <- tbl_start(iris, "Species", missing=TRUE, overall=TRUE, comparison=TRUE) %>%
  num_row("Sepal.Length", rowlabel="Sepal Length") %>%
  empty_row() %>%
  num_row("Sepal.Width", rowlabel="Sepal Width") %>%
  empty_row() %>%
  num_row("Petal.Length", rowlabel="Petal Length") %>%
  empty_row() %>%
  num_row("Petal.Width", rowlabel="Petal Width") %>%
  empty_row() %>%
  cat_row("Stem.Size", rowlabel="Stem Size") %>%
  empty_row() %>%
  binary_row("color", rowlabel="Color") %>%
  tbl_out() %>%
  print()

Run the code above in your browser using DataLab