show_rows: Selects the rows to be printed

Description Usage Arguments Value See Also Examples

View source: R/show_rows.R

Description

Keeps the rows you mention in the printed table. Compared to filter, show_rows does not remove the rows from the actual data frame, they are removed only for printing.

Usage

1

Arguments

x

condformat_tbl object

...

Expressions used for filtering

Value

A condformat_show_rows object, usually to be added to a condformat_tbl object as shown in the examples

See Also

filter

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
library(condformat)
data(iris)
x <- head(iris)
cf <- condformat(x) %>% show_rows(Sepal.Length > 4.5, Species == "setosa")
## Not run: 
print(cf)

## End(Not run)
# Use it programatically
expr_as_text <- 'Sepal.Length > 4.5'
expr <- rlang::parse_expr(expr_as_text)
cf <- condformat(x) %>% show_rows(!! expr)
## Not run: 
print(cf)

## End(Not run)
# With multiple arguments:
expr_as_text <- c('Sepal.Length > 4.5', 'Species == "setosa"')
exprs <- lapply(expr_as_text, rlang::parse_expr)
cf <- condformat(x) %>% show_rows(!!! exprs)
## Not run: 
print(cf)

## End(Not run)

Example output

sh: 1: xdg-open: Permission denied
sh: 1: xdg-open: Permission denied
sh: 1: xdg-open: Permission denied

condformat documentation built on July 8, 2020, 6:20 p.m.