Learn R Programming

tablet (version 0.6.8)

splice.data.frame: Splice A Data Frame

Description

Splices a data.frame. If the data.frame has groups, tablet() is called for each group in succession, only the last of which requests 'all'. The results are column-bound, and duplicate columns are removed.

Usage

# S3 method for data.frame
splice(x, all = "All", ...)

Value

tablet

Arguments

x

data.frame

all

a column name for ungrouped statistics; can have length zero to suppress ungrouped column

...

passed to tablet

Examples

Run this code
library(boot)
library(dplyr)
library(magrittr)
melanoma %>%
  select(-time, -year) %>%
  mutate(sex = factor(sex), ulcer = factor(ulcer)) %>%
  mutate(status2 = ifelse(status == 2, 2, 4)) %>%
  group_by(status, status2) %>%
  splice

Run the code above in your browser using DataLab