Skip to contents

Subsetting a tbl_sample with [ preserves the tbl_sample class and its sampling metadata when the essential column (.weight) remains. Row subsetting that changes the number of rows, and column subsetting that drops internal design columns (.fpc_k, .weight_k, ...), mark the sample as modified, consistent with dplyr::filter() and dplyr::select() (see dplyr_reconstruct.tbl_sample()).

Usage

# S3 method for class 'tbl_sample'
x[i, j, ..., drop = FALSE]

Arguments

x

A tbl_sample object

i

Row index

j

Column index

...

Additional arguments passed to the default method

drop

Coerce to lowest possible dimension

Value

A tbl_sample if essential columns remain, otherwise a data.frame