Learn R Programming

usefun (version 0.5.2)

prune_columns_from_df: Prune single-value columns from a data frame

Description

Given a data.frame and an integer value, it checks whether there is a column vector whose values match the given one. If so, it prunes that single-valued column from the data.frame

Usage

prune_columns_from_df(df, value)

Value

the column-pruned data.frame

Arguments

df

data.frame

value

an integer value

Examples

Run this code
df = data.frame(c(0,0,0), c(0,1,0), c(1,0,0))
prune_columns_from_df(df, value = 0)

Run the code above in your browser using DataLab