Slice data by row number

slice_data(.data, ...)

Arguments

.data

Input data frame

...

Expression to evaluate to integer row positions

Value

.data of evaluated row positions

Examples

## data set d <- tbl_data(x = rnorm(10), y = rnorm(10)) ## slice first 4 rows slice_data(d, 1:4)
#> # A tibble: 4 x 2 #> x y #> <dbl> <dbl> #> 1 0.280 -0.520 #> 2 0.107 0.879 #> 3 -0.00602 -0.539 #> 4 1.74 1.36