inspect {observer} | R Documentation |
Inspect observations
Description
Once a table has been observed with observe_if
, one may wish to dig
into the observations made. The function inspect
returns a sub-table
of .data
whose rows correspond to the rows identified by the
observation ob
.
Usage
inspect(.data, ob, cols = "all")
Arguments
.data |
A tbl or data frame. |
ob |
integer. A row of the |
cols |
character. One of |
See Also
observe_if
in this package.
Examples
library(magrittr)
df <- data.frame(id = c("a", "b", "c"), x = 1:3, y = 2:4, z = c(1.1, 10, 5))
df <- df %>%
observe_if(z==floor(z),
y-x==1,
x < 3) %>%
observe_if(y < 4,
x > 1)
print(obs(df))
df1 <- df %>%
inspect(ob = 5, cols="most")
print(obs(df1))
[Package observer version 0.1.2 Index]