view: Chainable View

Description Usage Arguments See Also Examples

View source: R/view.R

Description

A View that doesn't break a pipeline. Same thing as utils::View(), but returns the original data object invisibly to allow putting view commands anywhere in a pipeline. This also allows for adding a view command at the end of pipelines while also assigning the data object the pipeline returns.

Usage

1
view(x, title)

Arguments

x

an R object which can be coerced to a data frame with non-zero numbers of rows and columns

title

the title for the viewer window; defaults to name of x if not given

See Also

View

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
# 1
view(iris)

# 2
iris_test <- iris %>%
  group_by(
    Species
  ) %>%
  summarise(
    sum = sum(Petal.Width)
  ) %>%
  view('iris:sum') %>%
  mutate(
    sum_squared = sum^2
  ) %>%
  view('iris:sum_squared')

## End(Not run)
#

Paul-James/pjames documentation built on Aug. 9, 2019, 12:18 p.m.