Learn R Programming

iNZightTools (version 2.0.1)

remove_rows: Remove rows from data by row numbers

Description

This function filters a dataframe or a survey design object by removing specified rows based on the provided row numbers. The resulting filtered dataframe is returned, along with the tidyverse code used to generate it.

Usage

remove_rows(data, rows)

Value

A filtered dataframe with the tidyverse code attached.

Arguments

data

A dataframe or a survey design object to be filtered.

rows

A numeric vector of row numbers to be sliced off.

Author

Owen Jin, Zhaoming Su

See Also

code

Examples

Run this code
data <- remove_rows(iris, rows = c(1, 4, 5))
cat(code(data))
head(data)

Run the code above in your browser using DataLab